New course! Every coder should learn Generative AI!
Try a free lesson+ 4
Jaleel Ayandokun,
prompt/alert is native browser functionality, and therefore not very flexible.
Unfortunately, you cannot mask the input from a prompt/alert.
U can use Jquery dialog()
or what I recommend is create a custom modal box with an input tag that has a password type for example.
Here is a snippet of a custom modal box, hope it helps👍:
https://code.sololearn.com/W454f7IK92kq/?ref=app