如何在javascript promt框中输入密码 [英] how to take input as password in javascript promt box
问题描述
我想在java脚本提示框中输入密码,但它只输入字符串,这是可见的,现在我可以在同一文本字段中输入密码。
是否有任何方法可以将此文本字段从输入类型文本更改为不含div的密码
这是我已经尝试过的方法。
提示符(输入密码);
这里是例子
任何人都可以告诉我我可以如何使用j查询或java脚本执行此操作
不,您不能。
这个弹出窗口是浏览器控制的,不能改变。
你可以使用javascript对话框进行设置
HTML代码
< div id =dialogtitle =Basic对话>
< input type =passwordsize =25/>
< / div>
JAVASCRIPT CODE
$(#dialog).dialog();
DEMO i want to take input password in java script prompt box but it only take input as string which is visible now how i can take input password in same text field. is there any way to change this text field from input type text to password without div
this is what i have already tried
prompt("enter password");
here is example
can any one suggest me how i can do this using j query or java script
No, you can't.
The popup is browser controlled and can't be changed.
you can use javascript dialog box for it
HTML CODE
<div id="dialog" title="Basic dialog">
<input type="password" size="25" />
</div>
JAVASCRIPT CODE
$( "#dialog" ).dialog();
这篇关于如何在javascript promt框中输入密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!