AngularJS ng-mouseover 指令

AngularJS 教程 · 2019-04-01 22:17:55

AngularJS 实例

在鼠标指针移动到元素上时执行表达式:

<div ng-mouseover="count = count + 1" ng-init="count=0">鼠标移动到我这!</div>

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

定义和用法

ng-mouseover 指令用于告诉 AngularJS 鼠标移动到指定的 HTML 元素上时要执行的操作。

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

语法

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

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

参数值

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

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

查看所有标签

A Common-Sense Guide to Data Structures and Algorithms

A Common-Sense Guide to Data Structures and Algorithms

Jay Wengrow / Pragmatic Bookshelf / 2017-8-13 / USD 45.95

If you last saw algorithms in a university course or at a job interview, you’re missing out on what they can do for your code. Learn different sorting and searching techniques, and when to use each. F......一起来看看 《A Common-Sense Guide to Data Structures and Algorithms》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

随机密码生成器
随机密码生成器

多种字符组合密码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具