会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
notecup
博客园
首页
新随笔
联系
订阅
管理
2022年11月14日
阻止冒泡和捕获
摘要: 冒泡和捕获的顺序(先从上往下捕获,后从下往上冒泡) 2.event.stopPropagation()阻止 click 事件冒泡到父元素。 3.event.preventDefault() 默认事件指的是,标签这类有默认行为的标签,通过点击可以跳转或提交。我们给这类标签绑定一个点击事件,设置事件对象
阅读全文
posted @ 2022-11-14 12:23 木莲
阅读(55)
评论(0)
推荐(0)
2022年11月10日
js数字取整的方法
摘要: parseInt(123.34)=123(保留整数) Math.ceil(123.34)=124(向上取整) Math.floor(123.34)=123(向下取整) Math.round(123.34)=123,Math.round(123.56)=124四舍五入 123.234.toFixe(2
阅读全文
posted @ 2022-11-10 17:12 木莲
阅读(398)
评论(0)
推荐(0)
2022年11月8日
input type='number' 去除小箭头 clear arrow
摘要: #input type='number' 去除小箭头 两种方法 方法一 For chrome, Safari, Edge, Opera : input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-app
阅读全文
posted @ 2022-11-08 15:38 木莲
阅读(203)
评论(0)
推荐(0)
公告