+ 3
How i can get this words "username" "password" written in its boxes and disappear when the user write his data in the boxes ?!
7 Respuestas
+ 4
Simple using placeholder attribute in input tag see this code.....
<html>
<head>
<title>Placeholder</title>
<head>
<body>
<form action="#" method="post">
<input type="text" name="username" placeholder="Username" required="yes"></input>
<input type="password" name="password" placeholder="password" required="yes"></input>
<input type="submit"></input>
</form
</body>
</html>
+ 1
Look it up in w3 schools. Plenty of information there if you are not familiar with the syntax. Search html forms and it should pop up.
+ 1
use placehoder.
<html>
<head>title="name the form here"</head>
<body>
<form action="www.example.com" method="post">
<input type="text" name="username" placeholder="username"></input>
<input type="submit"></input>
</form>
</body>
</html>
0
@Nikolai Russev if i use value, i found the form was filled with the value you have made.
0
Just use the placeholder attribute. For example:
<html>
<head>
</head>
<body>
<form>
<input type="username" name="username" PLACEHOLDER="username">
<input type="password" name="password" PLACEHOLDER="password">
<input type="submit" onclick="<Interactivity here>">
</form>
</body>
</html>
- 1
i cant get it ? explain more please u didnt add any difference !!
- 5
Use the value keyword inside the tag.
Example:
<input type="text" value="username">