placeholder在IE8中兼容性问题解决
来源:互联网 发布:帝国cms 火车头 编辑:程序博客网 时间:2024/06/06 01:25
<script type="text/javascript"> if( !('placeholder' in document.createElement('input')) ){ $('input[placeholder],textarea[placeholder]').each(function(){ var that = $(this), text= that.attr('placeholder'); if(that.val()===""){ that.val(text).addClass('placeholder'); } that.focus(function(){ if(that.val()===text){ that.val("").removeClass('placeholder'); } }) .blur(function(){ if(that.val()===""){ that.val(text).addClass('placeholder'); } }) .closest('form').submit(function(){ if(that.val() === text){ that.val(''); } }); }); } </script>
阅读全文
0 0
- placeholder在IE8中兼容性问题解决
- 解决placeholder兼容性问题
- 解决nth-child(n)属性在IE8浏览器中兼容性问题
- Carousel在IE8兼容性问题
- 解决DIV+CSS设计在IE6/IE7/IE8/火狐-兼容性问题
- 解决jQuery-Validate在ie8的兼容性问题(亲测可行)
- 解决ie8不支持placeholder方法
- placeholder在IE8中不显示,一种解决办法
- ie8及其以下版本兼容性问题之placeholder实现
- Jquery解决'placeholder'针对IE的兼容性问题
- 用JavaScript解决Placeholder的IE8兼容问题
- IE7 IE8 的兼容性问题解决(微软)
- 解决ie8兼容性问题(方法总结)
- 如何解决IE7和IE8的兼容性问题
- echarts解决360及IE8兼容性问题
- 解决IE8下的一些兼容性问题
- 解决IE8下的一些兼容性问题
- 用简单的JS 间接解决IE8 中无法兼容placeholder的问题
- easyui----DataGrid DetailView(数据表格详细展示)
- RecyclerView 获取显示item的位置
- springmvc 最简化配置
- css+js实现进度滚动条
- Win10 .net framework 3.5 安装方法(亲测有效)
- placeholder在IE8中兼容性问题解决
- 腾讯推出新图片格式 TPG,但可能还是没法替代 JPEG
- iOS 应用内付费(IAP)开发步骤
- 迷宫问题 (广搜+记录路径)
- 模糊测试工具Sulley开发指南(1)——安装Sulley(多图,超详细)
- mysql基础语句
- 友盟分享:Share fail with error Error Domain=UMSocialPlatformErrorDomain Code=2001
- git使用
- Spring MVC过滤器-委派过滤器代理(DelegatingFilterProxy)