如何将密码点更改为星号

Asm*_*are 8 html css

我正在创建密码字段,我必须使用星号代替密码点。目前,我正在使用这个

<input type="text" style="-webkit-text-security: square;" />
Run Code Online (Sandbox Code Playgroud)

但是当我使用星号代替正方形时,它不起作用。有什么解决办法吗。

Adr*_*ano 2

您需要password在输入的类型字段中指定。像这样:

<input type="password" style="-webkit-text-security: square;" />
Run Code Online (Sandbox Code Playgroud)

请参阅此处了解更多信息:https ://www.w3schools.com/html/html_form_input_types.asp


您可能还想查看: