Dug this out of the archives...
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>untitled</title>
<script type="text/javascript" language="javascript">
function toPassword(oInput) {
var newEl = document.createElement('input');
newEl.setAttribute('type', 'password');
newEl.setAttribute('name', 'password');
oInput.parentNode.replaceChild(newEl,oInput);
toPassword.el = newEl;
setTimeout('toPassword.el.focus()',100);
return true;
}
</script>
</head>
<body>
<input type="text" name="username" value="Enter your Username"
onfocus="if(this.value==this.defaultValue)this.value=''">
<input type="text" name="password" value="Enter your Password"
onfocus="if(this.value==this.defaultValue)return toPassword(this)">
</body>
</html>
Bookmarks