TextBox Takes only Integers:
<script
type="text/javascript">
function
isNumberKey(evt) {
var
charCode = (evt.which) ? evt.which : event.keyCode
if
(charCode != 46 && charCode > 31 && (charCode <
48 || charCode > 57)) {
return
false;
}
else
{
return
true;
}
}
</script>
call the Function in
<asp:TextBox
runat="server"
ID="txtTenantID"
onKeyPress="return
isNumberKey(event)"></asp:TextBox></span>
Page Load Event IN Javascript:
Page Load Event IN Javascript:
<script type="text/javascript">
window.onload = function(){
//do something here
}
</script>
No comments:
Post a Comment