window.prompt("欢迎您的入库!!","请在此输入您的密码。")怎样隐藏密码,在线等急!!!!

walwyp 2004-09-02 12:10:43
window.prompt("欢迎您的入库!!","请在此输入您的密码。")
我希望把密码以*号形式显示出来怎么办呀!!
...全文
1486 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
jianzong2000 2005-03-18
  • 打赏
  • 举报
回复
这样做的话
是不是 新生成了一个 request呢
dqcol 2005-02-28
  • 打赏
  • 举报
回复
加油
cm1024 2005-02-28
  • 打赏
  • 举报
回复
学习!顶!
梅雪香 2005-01-12
  • 打赏
  • 举报
回复
main.htm
<html>
<head>
<script language=javascript>
<!--
/*@cc_on @*/
/*@if (@_win32 && @_jscript_version>=5)
function window.prompt(obj,str1)
{
obj.value=window.showModalDialog("prompt.htm",str1,"status:no;dialogHeight:40px;dialogWidth: 300px;edge: Raised; center: Yes; help: No; resizable: no; status: No;scroll:no");
}
@end @*/
//alert(confirm('sure?'));
//window.prompt("请输入密码11:");
// -->
</script>

</head>
<body>
<input type="text" id="txtPwd" onclick='javascript:window.prompt(this,"请输入密码:");'>
</body>
</html>


//prompt.htm
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Untitled Document</title>
<style type="text/css">
body{background-color: buttonface;font-size:15px;}
</style>
<script language="JavaScript">
<!--
document.title="prompt";
var str = window.dialogArguments;
function doCancel(){
window.returnValue="";
window.close();
}
function doSure(){
if(txtPwd.value==""){
alert("密码不能为空!");
txtPwd.focus();
return;
}
window.returnValue=txtPwd.value;
window.close();
}
window.onblur=function (){txtPwd.focus();}
//-->
</script>
</head>

<body>
<script language="JavaScript">
<!--
document.write(str);
//-->
</script>
<input type="password" id="txtPwd" style="width:100% " value="">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="right">
<input type="button" onclick="doCancel()" value="取消">
<input type="button" onclick="doSure()" value="确定">
</td>
</tr>
</table>
</body>
</html>
wen1818 2005-01-12
  • 打赏
  • 举报
回复
不可以的
ouyld 2004-10-16
  • 打赏
  • 举报
回复
用别的软件可以
因为这是系统内置的
用表单则可以以任何符号显示
defoliation 2004-10-16
  • 打赏
  • 举报
回复
没见过!!!
建议采用 mrshelly(Shelly) 的Idea
mrshelly 2004-10-16
  • 打赏
  • 举报
回复
用 window.open 开新窗 做表单
tsoukw 2004-10-16
  • 打赏
  • 举报
回复


i want to know too
xiaolin0987 2004-10-16
  • 打赏
  • 举报
回复
用screnc吧
ncowboy 2004-10-16
  • 打赏
  • 举报
回复
用网页的模态对话框

风流才子 2004-09-02
  • 打赏
  • 举报
回复
不可以

87,917

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧