Hi Friends now I am discuss about onblur event in HTML.Onblur event is triggered
when selection of a control like text box or button loses.Onblur can used to call a javascript function which do a specific task such as validation/case change.
I am here including a sample program.
This program will convert the name entered in the name text box into upper case.
Hope that this post is usefull to you.
Thanks By Sukesh sukeshbr@gmail.com
when selection of a control like text box or button loses.Onblur can used to call a javascript function which do a specific task such as validation/case change.
I am here including a sample program.
<html>
<head>
<script type="text/javascript">
function Casechange()
{
var name=document.getElementById("txtname").value
document.getElementById("txtname").value=name.toUpperCase()
}
</script>
</head>
<body>
Enter your name: <input type="text" id="txtname" onblur="Casechange()">
</body>
</html>
<head>
<script type="text/javascript">
function Casechange()
{
var name=document.getElementById("txtname").value
document.getElementById("txtname").value=name.toUpperCase()
}
</script>
</head>
<body>
Enter your name: <input type="text" id="txtname" onblur="Casechange()">
</body>
</html>
This program will convert the name entered in the name text box into upper case.
Hope that this post is usefull to you.
Thanks By Sukesh sukeshbr@gmail.com
No comments:
Post a Comment