用javascript怎样改变<input type=password>的type属性为text? <input type="text" name="userpassword"> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script>function gpxh(){document.form1.userpassword1.style.display = "";document.form1.userpassword.style.display = "none";}</script><form method="post" name="form1" action=""> <input type="password" name="userpassword" style="display:" onpropertychange="userpassword1.value=this.value"><input type="text" name="userpassword1" style="display:none"> <input type="button" value="ok" onclick="javascript:gpxh();"></form> type属性不能修改的,一般的方法就是孟子的方法,写两个input <script>function gpxh(){ var value = document.form1.userpassword.value; document.form1.userpassword.outerHTML="<input type=text value="+value+" name=userpassword>";}</script><form method="post" name="form1" action=""> <input type="password" name="userpassword"> <input type="button" value="ok" onclick="javascript:gpxh();"> <input type="button" value="get value" onclick="alert(this.form.userpassword.value);"></form> 请问Javascript怎样调用dll里面的方法 弹出DIV 如何移动一个文本框且同时可以打字 location.href=d.g('a').value;不兼容IE. javascript函数参数问题--急急急 高手帮忙看看换行问题? js脚本如何取得虚拟目录名称,谢谢 请问:如何将一个层在网页中对于一个表格或整篇页面相对定位,谢谢! 关于复选框的校验与函数引用问题 简单问题高分求---点击后出现新的输入框 急上加急!!!需高高手解决这个问题! 怎样得到客户端MAC地址(B/S方式下)?
function gpxh()
{
document.form1.userpassword1.style.display = "";
document.form1.userpassword.style.display = "none";
}
</script><form method="post" name="form1" action="">
<input type="password" name="userpassword" style="display:" onpropertychange="userpassword1.value=this.value">
<input type="text" name="userpassword1" style="display:none">
<input type="button" value="ok" onclick="javascript:gpxh();">
</form>
function gpxh()
{
var value = document.form1.userpassword.value;
document.form1.userpassword.outerHTML="<input type=text value="+value+" name=userpassword>";
}
</script><form method="post" name="form1" action="">
<input type="password" name="userpassword">
<input type="button" value="ok" onclick="javascript:gpxh();">
<input type="button" value="get value" onclick="alert(this.form.userpassword.value);">
</form>