In this article i will show you how we can dispable the ente key using javascript in asp.net.
So here we go create a new asp.net web application and add a new page and add the below javascript code at the header of the page
Now call this code at the body tak of the page.
now run the page check the output.
So here we go create a new asp.net web application and add a new page and add the below javascript code at the header of the page
<script type="text/javascript">
function DisableEnterKey() {
if (event.keyCode == 13) {
return false;
}else {
return true;
}
} </script>
function DisableEnterKey() {
if (event.keyCode == 13) {
return false;
}else {
return true;
}
} </script>
Now call this code at the body tak of the page.
<body onkeydown="javascript:return DisableEnterKey()">
now run the page check the output.
Tags: Asp.Net , Javascript
No comments:
Post a Comment