Tuesday 7 June 2011

JavaScript Select Focus



Select : By using this function we can select the content of a control.
Focus: By using this, we can place or locate the cursor on a control.
Sample Script :
<script>
function fun1()
{
pwd=document.getElementByid('txtpwd').value
rpwd=document.getElementByid('txtrpwd').value
if(pwd!=rpwd)
alert("Missmatch Password"
}
</script>
Password:<input type="text" id="txtpwd">
<br>
Retype Password:<input type="text" id="txtrpwd" onblur="fun1()">

0 comments:

Post a Comment