AngularJS ng-paste 指令

AngularJS 教程 · 2019-04-01 23:39:46

AngularJS 实例

文本被粘贴时执行表达式:

<input ng-paste="count = count + 1" ng-init="count=0" value="粘贴文本到这" />

定义和用法

ng-paste 指令用于告诉 AngularJS 文本在 HTML 元素上粘贴时需要执行的操作。

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

语法

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

<input>, <select>, <textarea> 及其他可编辑元素支持该指令。

参数值

描述
expression 文本粘贴到元素上执行的表达式。

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

查看所有标签

Hacking

Hacking

Jon Erickson / No Starch Press / 2008-2-4 / USD 49.95

While other books merely show how to run existing exploits, Hacking: The Art of Exploitation broke ground as the first book to explain how hacking and software exploits work and how readers could deve......一起来看看 《Hacking》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具