English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script src="https://cdn.staticfile.org/angular.js/1.4.6/angular.min.js"></script> </head> <body ng-app=""> <p>Double-click the title:/p> <h1 ng-dblclick="count = count + 1" ng-init="count=0">Welcome</h1> <p>Double-clicked {{count}} times.</p> <p>Count variable "count" is incremented each time the title is double-clicked. 1。</p> </body> </html>Test and see ‹/›
ng-dblclick The directive is used to tell AngularJS what operation needs to be performed when the mouse double-clicks on an HTML element.
ng-dblclick The directive does not override the original ondblclick event of the element, when double-clicking,ng-dblclick Both the expression and the original ondblclick event will be executed.
<element ng-dblclick="expression"></element>
All HTML elements support this directive.
Value | Description |
---|---|
expression | Expression executed after double-clicking an element. |