Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 263
  • Last Modified:

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?
0
petersonpol
Asked:
petersonpol
1 Solution
 
Michel PlungjanIT 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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now