密码框点击提示问题消失 如何未点击密码提示框的时候密码框里有汉字的提示信息,点击密码框提示信息消失,并且输密码的时候变为********** 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <head><style type="text/css">.password{width:150px;}.hint{color:#ccc;}.hidden{display:none;}</style><script type="text/javascript">function password_hint_focus(sender) { sender.className = "hidden"; var input = document.getElementById("password_input"); input.className = "password"; input.focus();}function password_input_blur(sender) { if (!sender.value) { sender.className = "hidden"; var hint = document.getElementById("password_hint"); hint.className = "password hint"; }}</script></head><body> <form> 密码: <input id="password_hint" class="password hint" type="text" value="请输入密码..." onfocus="password_hint_focus(this)"/> <input id="password_input" class="hidden" type="password" name="password" title="请输入密码..." onblur="password_input_blur(this)"/> </form></body> JS三级联动下拉列表。如何让下拉列表中的值为默认值,请大家帮忙指点一下。 哪位大侠有正则表达式分析网页的例子程序啊,急用啊,要写一个信息采集程序?求牛人 js实现幻灯片效果 无法实现页面跳转 Ext combobox.store.load(); 加分啦!!! 提示错误后, 怎么还是提交信息呢? 数据table之间的移动(可能没解释清楚,请进帮忙) 关于梅花雪树控件的問題! 100分问题 js调用action查库后怎么返回到jsp列表中 如何获取input在IE中相对于body的Top 如何将extjs中的window显示在frame的外面?
<style type="text/css">
.password{width:150px;}
.hint{color:#ccc;}
.hidden{display:none;}
</style>
<script type="text/javascript">
function password_hint_focus(sender) {
sender.className = "hidden";
var input = document.getElementById("password_input");
input.className = "password";
input.focus();
}function password_input_blur(sender) {
if (!sender.value) {
sender.className = "hidden";
var hint = document.getElementById("password_hint");
hint.className = "password hint";
}
}
</script>
</head>
<body>
<form>
密码:
<input id="password_hint" class="password hint" type="text" value="请输入密码..." onfocus="password_hint_focus(this)"/>
<input id="password_input" class="hidden" type="password" name="password" title="请输入密码..." onblur="password_input_blur(this)"/>
</form>
</body>