我正在创建密码字段,我必须使用星号代替密码点。目前,我正在使用这个
<input type="text" style="-webkit-text-security: square;" />
Run Code Online (Sandbox Code Playgroud)
但是当我使用星号代替正方形时,它不起作用。有什么解决办法吗。
您需要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
您可能还想查看: