password field with text visible at the start

I would like to do like on facebook when you login the password field is labeled: 'Password'
but when i start writing text is coded ******

How to do that?
petersonpolAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Michel PlungjanConnect With a Mentor IT ExpertCommented:
here


<script>
function showPassword(theField) {
  theField.style.display='none'; 
  theField.form.password.style.display=''; 
  theField.form.password.focus()
}  
</script>
<form>
<input type="text" value="password" onFocus="showPassword(this)" style="width:120px" />
<input type="password" name="password" style="display:none; width:120px"  />
</form>

Open in new window

0
 
petersonpolAuthor Commented:
thanks
0
All Courses

From novice to tech pro — start learning today.