So I've got a password field, with the value set to "Password." I've got some very simple javascript that sets the value to '' onfocus. I want the password to be blocked out, replaced with dots, as is usual. The problem is, if I make the field a password field, the original value, "Password," appears as dots. Is there any simple way to make the original value "Password" and the rest, after onfocus, dots? Or would I have to change the font after onfocus as well to a custom font that's only dots?
Here's my HTML:
<!DOCTYPE html>
<html>
<head>
<title>SuM BUTtonsS DOe</title>
<link rel="stylesheet" href="buttons.css"/>
</head>
<body>
<p>Please enter the password.</p>
<form>
<input id="password" type="textbox" value="Password" onfocus="if (this.value=='Password') this.value='';" onblur="if (this.value=='') this.value='Password';"/>
</form>
</body>
</html>