<script type="text/javascript">
function upperCase()
{
var y=document.getElementById('fname').value
if (y=="")
{
document.getElementById('tishi1').innerHTML="place weite?"
}
else
{
document.getElementById('tishi1').innerHTML=""
document.getElementById('tishi1').hidden=true
document.getElementById("fname").value=y.toUpperCase()
}
}
function getpass()
{
var pass=document.getElementById('pass').value
if (pass=="")
{
document.getElementById('tishi2').innerHTML="place weite?"
}
else
{
document.getElementById('tishi2').innerHTML=""
document.getElementById("pass").value=pass.toUpperCase()
}
}
function getrepass()
{
var repass=document.getElementById('repass').value
if (repass=="")
{
document.getElementById('tishi3').innerHTML="place weite?"
}
else
{
document.getElementById('tishi3').innerHTML=""
document.getElementById("repass").value=repass.toUpperCase()
}
}
function formSubmit()
{
var sname=document.getElementById('fname').value
var pass=document.getElementById('pass').value
var repass=document.getElementById('repass').value
if (sname=="" || pass=="" || repass=="")
{
alert("please fill the re-type password?");
return false;
}
else
{
document.getElementById('myForm').submit()
}
}
</script>
<body>
<form id="myForm" action="sss.asp" method="get">
name:
<input type="text" id="fname" onBlur="upperCase()" onKeyDown=""/>
<p id="tishi1"></p>
pass:
<input type="text" id="pass" onBlur="getpass()" />
<p id="tishi2"></p>
re-pass:
<input type="text" id="repass" onBlur="getrepass()" />
<p id="tishi3"></p>
<input type="button" οnclick="formSubmit()" value="Submit">
</form>
</body>