您的位置:首页 > 其它

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 可以去网上下载
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ie6 placeholder