会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
hiuman
既要提出问题,也要解决问题。
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
下一页
2016年10月13日
原生JavaScript实现jQuery的hasClass,removeClass,addClass,toggleClass
摘要: 介绍: 1、hasClass:判断DOM元素是否存在类。 2、addClass:为的DOM元素添加类。 3、removeClass:删除DOM元素的类。 4、toggleClass:如果DOM元素存在(不存在)类,就删除(添加)类。 原生 JavaScript 实现的代码:
阅读全文
posted @ 2016-10-13 17:56 hiuman
阅读(300)
评论(0)
推荐(0)
2016年10月12日
JavaScript实现多个菜单的显示隐藏(JavaScript实现二级/三级菜单的显示隐藏)
摘要: (如有错敬请指点,以下是我工作中遇到并且解决的问题) 效果图 : 可以通过 https://littlehiuman.github.io/07-menus/ 查看效果。 https://github.com/littleHiuman/littleHiuman.github.io 求点star~~~
阅读全文
posted @ 2016-10-12 17:53 hiuman
阅读(1226)
评论(0)
推荐(0)
2016年10月9日
用css控制table td内文字超出隐藏
摘要: (如有错敬请指点,以下是我工作中遇到并且解决的问题) 效果图: 重点是把table设置为table-layout: fixed; 超出的文字隐藏的效果才有。 p标签超出的文字隐藏的效果不需要设置这个内容就可以有效果。
阅读全文
posted @ 2016-10-09 10:08 hiuman
阅读(2606)
评论(0)
推荐(0)
2016年9月29日
使用AngularJS给Input type=‘date‘赋值
摘要: (如有错敬请指点,以下是我工作中遇到并且解决的问题) 需要使用AngularJS动态给<input type="date" />赋值。 我使用的是ng-bind=""和ng-value="",两个都没有出现想要的效果。 就百度了一下,以下是有用的信息: http://www.myexception.
阅读全文
posted @ 2016-09-29 10:37 hiuman
阅读(2795)
评论(0)
推荐(0)
2016年9月24日
javascript 实现简单拖拽(鼠标事件 mousedown mousemove mouseup)
摘要: 效果图: 可以通过 https://littlehiuman.github.io/06-Dragable/index.html 查看效果。 https://github.com/littleHiuman/littleHiuman.github.io 求点star~~~ CSS: * { margin
阅读全文
posted @ 2016-09-24 15:55 hiuman
阅读(565)
评论(0)
推荐(0)
2016年9月18日
js插件 日期选择器 datePicker(拖拽上下拉动的选项)
摘要: 新版本更新:鼠标上下拖动选择内容:http://hiuman.iteye.com/blog/2353563 (如有错敬请指点,以下是我工作中遇到并且解决的问题) 一开始搜这个内容的时候,搜索结果基本都是不沾边的。 很多都是日历选择器,最接近的就是这两种。 一对比之下,自然是选右侧的,简洁大方,美观。
阅读全文
posted @ 2016-09-18 18:15 hiuman
阅读(623)
评论(0)
推荐(0)
JavaScript 阻止事件冒泡
摘要: JavaScript停止冒泡和阻止浏览器默认行为 事件兼容 function myfn(e){ var evt = e ? e:window.event; } js停止冒泡 function myfn(e){ window.event? window.event.cancelBubble = tru
阅读全文
posted @ 2016-09-18 15:55 hiuman
阅读(161)
评论(0)
推荐(0)
2016年9月13日
css3实现鼠标移入图片划过一束光闪过效果
摘要: css3实现鼠标移入图片划过一束光闪过效果: 可以通过 https://littlehiuman.github.io/cssEffect/flashLightPic.html 查看效果。 https://github.com/littleHiuman/littleHiuman.github.io 求
阅读全文
posted @ 2016-09-13 13:59 hiuman
阅读(892)
评论(0)
推荐(0)
实时监听输入框值变化
摘要: (1)使用 jQuery 的话,同时绑定 oninput 和 onpropertychange 两个事件就可以了,代码: (2)对于JS原生写法而言, oninput 是 HTML5 的标准事件, 对于检测 textarea, input:text, input:password 和 input:s
阅读全文
posted @ 2016-09-13 10:35 hiuman
阅读(257)
评论(0)
推荐(0)
2016年9月12日
js实现输入框搜索提示功能
摘要: 效果图: 可以通过 https://littlehiuman.github.io/05-SearchList/ 查看效果。 https://github.com/littleHiuman/littleHiuman.github.io 求点star~~~ CSS: #kw { width: 286px
阅读全文
posted @ 2016-09-12 17:00 hiuman
阅读(1455)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
下一页
公告