js placeholder
来源:互联网 发布:进出口贸易数据期刊 编辑:程序博客网 时间:2024/06/05 13:25
// JavaScript Document$(function(){ 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(''); } }); }); } })
0 0
- js placeholder
- HTML5 placeholder JS模拟
- js模仿html5 placeholder
- javascript 基础 js实现placeholder
- placeholder
- placeholder
- Placeholder
- placeholder
- placeholder
- placeholder
- placeholder
- js实现html的placeholder属性效果
- js实现输入框仿html5 placeholder功能
- 积跬步,聚小流-------js实现placeholder的效果
- input、textarea标签placeholder兼容IE8浏览器js插件代码
- 【JS】null是用来表示对象的(null is as a placeholder for an object)
- 关于placeholder.js在IE78密码文本的提示文字调整
- 用简单的JS 间接解决IE8 中无法兼容placeholder的问题
- 最像JAVA的构造函数
- Coursera Machine Learning 第二周 quiz Programming Exercise 1: Linear Regression
- VS2010、SQL Server 2008安装详解
- Bmp位图文件
- “tar: Removing leading `/’ from member names”的错误
- js placeholder
- 洛谷 P1268 树的重量
- STL中swap的简单使用及总结
- C++设计模式——简单工厂模式
- leetcode_165. Compare Version Numbers 比较版本大小
- 登山c#-datetime说明
- BZOJ 1306 DFS
- 找女朋友——快排
- 2016-2017 CT S03E08: Codeforces Trainings Season 3 Episode 8 K1 gcd