关于变换输入框类型问题!不知道怎么解决 onFocus="if(this.value=='密用') this.value='***';"? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>/title></head><script language="javascript">function c(a){ a.parentNode.innerHTML="<INPUT type='password' value="+a.value+">"}</script><body><INPUT id=user onblur="if(this.value=='')value='aa';" onFocus="if(this.value=='aa')value='';" value=bb ><div id="aa"><INPUT id=pwd onblur="if(this.value=='') this.value='bb';" onFocus="c(this)" value="aa" > </div></body></html> <script>function setvalue(o){ if(o.value =="密码"){ o.outerHTML="<INPUT type=password id=pwd onblur=\"setvalue(this)\" onFocus=\"setvalue(this)\" value=\"***\" >" }else if(o.value ==""||o.value =="***"){ o.outerHTML="<INPUT id=pwd onblur=\"setvalue(this)\" onFocus=\"setvalue(this)\" value=\"密码\" >" }}</script><INPUT id=pwd type="text" onblur="setvalue(this)" onFocus="setvalue(this)" value=密码 > <script>window.onload=function(){pwd=document.getElementById("passwd")if(c_pwd){ pwd.style.display = "none"; c_pwd.style.display = ""; c_pwd.style.color = "#8F9AA0"; c_pwd.value = "密码"; } }</script><span><input type="text" style="display:none;" name="c_pwd" size="15" class="inp" tabindex="1" onfocus="c_pwd.style.display = 'none';pwd.style.display = '';pwd.focus()" /><input type="password" name="passwd" size="15" class="inp" tabindex="2" onchange="alert(this.value)"/></span> 想让 password 显示明文? 不可能只能用另一个text遮挡住password,当点击的时候定位到 password里面 晕,看我的了吗?yahoo上就这么操作的 如何在打开页面时将光标定位在某个文本框? jquery插件 Datatables,的 fnDraw()方法如何使用; 为什么有:eq()与.eq()的不同 【jquery】询问一下关于获取页面高度的问题 showModelessDialog打开的窗口进行数据库操作? script里的函数好像没起作用 点击一文本链接后在同一处出现 列表框 这段加密的JS怎么解密??? 如何用一个CheckBox控制另外一个CheckBox的灰暗? 如何取字符串中的字符? 同一个页面,js变量如何传递给asp变量 请问如何探测出用户用的浏览器,ie6和ie7的区别
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>/title>
</head><script language="javascript">
function c(a){
a.parentNode.innerHTML="<INPUT type='password' value="+a.value+">"
}
</script><body>
<INPUT id=user onblur="if(this.value=='')value='aa';" onFocus="if(this.value=='aa')value='';" value=bb >
<div id="aa"><INPUT id=pwd onblur="if(this.value=='') this.value='bb';" onFocus="c(this)" value="aa" > </div>
</body>
</html>
function setvalue(o){
if(o.value =="密码"){
o.outerHTML="<INPUT type=password id=pwd onblur=\"setvalue(this)\" onFocus=\"setvalue(this)\" value=\"***\" >"
}else if(o.value ==""||o.value =="***"){
o.outerHTML="<INPUT id=pwd onblur=\"setvalue(this)\" onFocus=\"setvalue(this)\" value=\"密码\" >"
}
}
</script>
<INPUT id=pwd type="text" onblur="setvalue(this)" onFocus="setvalue(this)" value=密码 >
window.onload=function(){
pwd=document.getElementById("passwd")if(c_pwd){
pwd.style.display = "none";
c_pwd.style.display = "";
c_pwd.style.color = "#8F9AA0";
c_pwd.value = "密码";
}
}
</script>
<span><input type="text" style="display:none;" name="c_pwd" size="15" class="inp" tabindex="1" onfocus="c_pwd.style.display = 'none';pwd.style.display = '';pwd.focus()" />
<input type="password" name="passwd" size="15" class="inp" tabindex="2" onchange="alert(this.value)"/>
</span>