admin管理员组文章数量:1327928
In the past, I've seen javascript alert()
style popups but they had input fields in them.
These forms are much like the primitive username/password field inputs you see when an .htpasswd
file is used.
Can someone tell me how to implement this using regular javascript? (No libraries please)
In the past, I've seen javascript alert()
style popups but they had input fields in them.
These forms are much like the primitive username/password field inputs you see when an .htpasswd
file is used.
Can someone tell me how to implement this using regular javascript? (No libraries please)
Share Improve this question asked Oct 13, 2010 at 20:38 mačekmaček 77.8k37 gold badges170 silver badges200 bronze badges1 Answer
Reset to default 10Yes, you're thinking of prompt
. It's just:
var userInput = prompt("text to display", "default input text");
Note that this is just a general input mechanism. It's separate from the authentication dialog, though the underlying browser code may use the same GUI controls.
本文标签: javascript input via native popupStack Overflow
版权声明:本文标题:javascript input via native popup - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742253945a2441278.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论