Skip to content Skip to sidebar Skip to footer

Wiping Out Default Text When User Will Enter A Username

I want to use JavaScript to wipe out default text and allow user to enter a his choice word. How do I integrate this thing with my HTML code. I need it for testing purpose. Below i

Solution 1:

<!DOCTYPE html>
<body bgcolor="black"><form method="get" action ="http://localhost:2013">
<center>
<font color="white" size=65>Enter Word: 

<input type="text" name="word" placeholder='Default Text'></font></center>
</br><center>

<font color="Green" size=65>
<input type="submit" value="SUBMIT"></font></center><
form>
</body>
</html>

Just add placeholder='Default Text' to your input element.


Solution 2:

No need of much items, this will help you...

<form action="demo_form">
  <input type="text" name="fname" placeholder="Your default text"><br>
  <input type="text" name="lname" placeholder="Your default text"><br>
</form>

Post a Comment for "Wiping Out Default Text When User Will Enter A Username"