placeholder效果的jQuery插件,支持IE6、IE7
<!DOCTYPE HTML><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>placeholder支持IE6/7</title><script type="text/javascript" src="jquery.1.9.1.min.js"></script><script type="text/javascript" src="jquery.placeholder1.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="name">用户名</label> <input type="text" id="userName" placeholder="输入用户名"/> <input type="button" value="取值" onclick="getValue()"/></form></body></html>
?
?下面有两个js控件,加入即可
?