Asp.net blogs

Friday 5 July 2013

Set focus of textbox while loading of Page using Javascript code as shown below :

Set focus of textbox while loading of Page using Javascript code as shown below : When someone open Login Page then first focus is set to Username textbox i.e txtUserName

<script type="text/javascript">
$(function() {
setTimeout(function() {
$("[id*=txUserName]").focus();
}, 10);
});
</script>

No comments:

Post a Comment