<html>
<head>
<script>
function check_valid(str)
{
var name=document.getElementById("username").value;
if(name=="")
{
document.getElementById("lb1").innerHTML="enter your name";
}
}
</script>
</head>
<form action="#" method="POST" name="form">
student user name:<input type="text" id=username name="username" onblur="check_valid(this.value)">
<br>
<div id="lb1" style="color:red";></div>
<input id="ok" style="margin-left: 74px;" type="submit" name="submit" value="create account!!">
</form>
</body>
</html>
<head>
<script>
function check_valid(str)
{
var name=document.getElementById("username").value;
if(name=="")
{
document.getElementById("lb1").innerHTML="enter your name";
}
}
</script>
</head>
<form action="#" method="POST" name="form">
student user name:<input type="text" id=username name="username" onblur="check_valid(this.value)">
<br>
<div id="lb1" style="color:red";></div>
<input id="ok" style="margin-left: 74px;" type="submit" name="submit" value="create account!!">
</form>
</body>
</html>
Thanks for sharing, please do post on Codelobster
ReplyDeleteplease check this link for checking https://sisgain.com/hire-node-js-developer
ReplyDelete