AngularJS ng-mouseleave 指令

AngularJS 教程 · 2019-04-01 21:37:15

AngularJS 实例

在鼠标指针离开元素时执行表达式:

<div ng-mouseleave="count = count + 1" ng-init="count=0">鼠标从我这移开 me!</div>

<h1>{{count}}</h1>

定义和用法

ng-mouseleave 指令用于告诉 AngularJS 鼠标从 HTML 元素上移开时要执行的操作。

ng-mouseleave 指令不会覆盖元素的原生 onmouseleave 事件, 事件触发时,ng-mouseleave 表达式与原生的 onmouseleave 事件将都会执行。

语法

<element ng-mouseleave="expression"></element>

所有的 HTML 元素支持该指令。

参数值

描述
expression 鼠标在元素上移开时执行的表达式。

点击查看所有 AngularJS 教程 文章: https://codercto.com/courses/l/36.html

查看所有标签

Developing Large Web Applications

Developing Large Web Applications

Kyle Loudon / Yahoo Press / 2010-3-15 / USD 34.99

As web applications grow, so do the challenges. These applications need to live up to demanding performance requirements, and be reliable around the clock every day of the year. And they need to withs......一起来看看 《Developing Large Web Applications》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

URL 编码/解码
URL 编码/解码

URL 编码/解码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换