Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
205 views
in Technique[技术] by (71.8m points)

javascript - Placing an input of type password in prompt box

Hello guys I know that is probably a stupid question but i had to be sure after all. Can i add an input of type password in a prompt box? prompt box is a one of javascript's Popup boxes.(Alert,Confirm and Prompt)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

No, you can't.

The popup is browser controlled and can't be changed.

As the documentation shows, you can only supply a message and default text.


You can use javascript to create your own overlay that simulates a prompt popup.

See the jQuery UI Dialog for ideas and examples.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...