zoukankan
html css js c++ java
jquery bind & unbind
<!
DOCTYPE html PUBLIC
"
-//W3C//DTD XHTML 1.0 Transitional//EN
"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
"
>
<
html xmlns
=
"
http://www.w3.org/1999/xhtml
"
>
<
head
>
<
meta http
-
equiv
=
"
Content-Type
"
content
=
"
text/html; charset=utf-8
"
/
>
<
title
>
4
-
6
-
2
<
/
title>
<
style type
=
"
text/css
"
>
*
...
{margin:
0
;padding:
0
;}
body
...
{ font
-
size: 13px; line
-
height:
130
%
; padding: 60px; }
p
...
{200px;background:#
888
;color:white;height:16px;}
<
/
style>
<
script src
=
"
../../scripts/jquery-1.3.1.js
"
type
=
"
text/javascript
"
><
/
script>
<
script type
=
"
text/javascript
"
>
$(
function
()
...
{
$(
'
#btn
'
).bind(
"
click
"
,
function
()
...
{
$(
'
#test
'
).append(
"
<p> 我的绑定函数1</p>
"
);
}
).bind(
"
click
"
,
function
()
...
{
$(
'
#test
'
).append(
"
<p> 我的绑定函数2</p>
"
);
}
).bind(
"
click
"
,
function
()
...
{
$(
'
#test
'
).append(
"
<p> 我的绑定函数3</p>
"
);
}
);
$(
'
#delAll
'
).click(
function
()
...
{
$(
'
#btn
'
).unbind(
"
click
"
);
}
);
}
)
<
/
script>
<
/
head>
<
body
>
<
button id
=
"
btn
"
>
点击我
<
/
button>
<
div id
=
"
test
"
><
/
div>
<
button id
=
"
delAll
"
>
删除所有事件
<
/
button>
<
/
body>
<
/
html>
other effect:
http://api.jquery.com/mousemove/
http://api.jquery.com/fadeIn/
查看全文
相关阅读:
27. 移除元素
axios调用webapi报错
MySql重装以后,修改数据库路径,打开以前的数据库报Table 'XX库.XX表' doesn't exist错误的解决办法
SqlServer2012,设置指定数据库对指定用户开放权限
win10无法访问服务器上的共享文件夹怎么设置,提示:你不能访问此共享文件夹,因为你组织的安全策略阻止未经身份验证的来宾访问
Vs2017的git的坑
jira6.3.6创建问题不自动发邮件通知的问题
在windows下面配置redis集群遇到的一些坑
SqlServer2008 无法修改表,超时时间已到 在操作完成之前超时解决方法
小程序中也可以使用三元运算符且可嵌套使用
原文地址:https://www.cnblogs.com/lexus/p/1735514.html
最新文章
.Net 下采用GET/POST/SOAP方式动态调用WebService的简易灵活方法(C#) [轉]Redfox
Celery配置
解决ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
思考
解决 “OSError: [Errno 1] Operation not permitted” when installing Scrapy in OSX 10.11 (El Capitan) (System Integrity Protection)
代码整洁之道读后感
Django基本配置
Mysql 事务学习笔记
更换ubuntu16.04 apt源
更换pip源到国内镜像,提升pip下载速度.
热门文章
Python学习笔记--装饰器
599. 两个列表的最小索引总和
205. 同构字符串
202. 快乐数
Running pipenv gives TypeError: 'module' object is not callable
283. 移动零
26. 删除排序数组中的重复项
557. 反转字符串中的单词 III
151. 翻转字符串里的单词
189. 旋转数组
Copyright © 2011-2022 走看看