runxinzhi.com
首页
百度搜索
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/
相关阅读:
PKUSC2022 游记
「ZJOI2022」树
「ZJOI2022」面条
NOI2016~2021 Solution Set
达梦数据库DM8企业版安装教程及问题解析
Spring Boot 内置工具类 Binge
ubuntu配置安装MySQL数据库
Xshell连接腾讯云服务器
Phoenix整合HBase安装部署、HBase整合Phoenix安装部署
spring cloud gateway中解决第一次请求失败的问题
原文地址:https://www.cnblogs.com/lexus/p/1735514.html
最新文章
Nginx+PHP基于docker搭建
IDEA设置项目的Java版本\mac的JDK版本\mvn编译选项\自定义包管理\编译时注解处理器
两台阿里云服务器搭建一个k8s集群简易教程
docker安装filebeat采集本地日志并检索到Elastic搭建Kibana呈现
Fastflow——基于golang的轻量级工作流框架
Ubuntu 20.04 部署Prmoetheus+grafana+mysql+mysqld_exporter+node_exporter
iOS全埋点解决方案数据存储
iOS全埋点解决方案时间相关
【旧活新整】SqlLabs全攻略(持续更新)
oracle 优化方法总结转发
热门文章
Summernote 粘贴时出现重复图片的BUG
mysql修复数据存储过程
Net6 Xunit 集成测试
删除pod磁盘无用日志
python yield
监控pod 磁盘状态
策略模式
nginx header配置
「ZJOI2022」众数
「AHOI2022」山河重整
Copyright © 2020-2023
润新知