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/
查看全文
相关阅读:
DI 之 3.4 Bean的作用域(捌)
DI 之 3.3 更多DI的知识(柒)
MySQL中基本的多表连接查询教程
DI 之 3.3 更多DI的知识(陆)
字符串(string)转json
如何查看连接mysql的ip地址
DI 之 3.2 循环依赖 (伍)
DI 之 3.1 DI的配置使用(肆)
IoC 之 2.3 IoC的配置使用(叁)
MySQL for Windows 解压缩版配置安装
原文地址:https://www.cnblogs.com/lexus/p/1735514.html
最新文章
String的那一大堆事儿--1
Date的那一大堆事儿--1
日期操作类--SimpleDateFormat类
日期操作类--DateFormat类
日期操作类--Calendar类
日期操作类--Date类
能源项目xml文件标签释义--<mvc:annotation-driven>
mysql 存储过程 demo
能源项目xml文件标签释义--<context:component-scan>
零配置 之 12.1 概述(拾柒)
热门文章
AOP 之 6.1 AOP基础(拾陆)
Spring表达式语言 之 5.4在Bean定义中使用EL(拾伍)
Spring表达式语言 之 5.3 SpEL语法(拾肆)
Spring表达式语言 之 5.1 概述 5.2 SpEL基础(拾叁)
资源 之 4.4 Resource通配符路径(拾贰)
资源 之 4.3 访问Resource(拾壹)
资源 之 4.2 内置Resource实现(拾)
资源 之 4.1 基础知识(玖)
GoF--原型设计模式
GoF--单例设计模式
Copyright © 2011-2022 走看看