ie6 placehoder 处理
2015-01-12 10:26
519 查看
摘要: 来自 http://www.jb51.net/article/27215.htm 我自己用IE6测试ok
<!DOCTYPE HTML>
<html xmlns="">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>placeholder支持IE6/7</title>
<script type="text/javascript" src="../Public/Js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="../Public/Js/jquery.placeholder-1.0.js"></script>
<script type="text/javascript">
$(function(){ $('input').placeholder({isUseSpan:true}); })
function getValue() { var textValue = $("#userName").val(); alert(textValue); }
</script>
</head>
<body>
<form> <label for="userName">用户名</label>
<input type="text" id="userName" placeholder="输入用户名"/>
<input type="button" value="取值" onclick="getValue()"/>
</form> </body> </html>
jquery.placeholder-1.0.js 可以去网上下载
<!DOCTYPE HTML>
<html xmlns="">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>placeholder支持IE6/7</title>
<script type="text/javascript" src="../Public/Js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="../Public/Js/jquery.placeholder-1.0.js"></script>
<script type="text/javascript">
$(function(){ $('input').placeholder({isUseSpan:true}); })
function getValue() { var textValue = $("#userName").val(); alert(textValue); }
</script>
</head>
<body>
<form> <label for="userName">用户名</label>
<input type="text" id="userName" placeholder="输入用户名"/>
<input type="button" value="取值" onclick="getValue()"/>
</form> </body> </html>
jquery.placeholder-1.0.js 可以去网上下载
相关文章推荐
- 【转】IE6下margin双倍边距Bug的处理办法
- IE6,IE7和FireFox兼容处理
- IE6下margin双倍边距Bug的处理办法
- IE6 png背景图片显示不正常处理
- 安卓版微信自带浏览器和IE6浏览器ajax请求abort错误处理
- 单独对IE6兼容进行处理的方法
- ie6下li:hover兼容处理方式一(hover及click)
- 安卓版微信自带浏览器和IE6浏览器ajax请求abort错误处理
- FLASH在IE6下Error 2032错的处理
- IE6下margin双倍边距Bug的处理办法
- css不兼容情况 background-position在firefox下不兼容,出现图片位置不对,的处理情况;ie6、ie7强制选择器。
- 兼顾ie6的透明图片处理的方案:让边更加好看点
- IE6下链接onclick事件处理中的请求被aborted
- 在IE6中JS不执行的问题处理
- IE6下png透明图片处理
- IE6下position:fiexd的BUG处理方法
- IE6 png处理
- IE6下兼容性处理方法
- 处理div 在IE6 IE7 IE8 不居中的问题
- div+css使用padding样式和!important标记实现Firefox和IE6处理带float样式的margin尺寸上的兼容