<pre lang="xml"><script type="text/javascript"> $(function() { $("form").bind("keypress", function(e) { if (e.keyCode == 13) return false; }); }); </script>
function checkShortcut() { if (event.keyCode == 13) { alert("Enter key is not allowed"); return false; } }
onkeydown="return checkShortcut();"
var texts = $("#textBoxID").bind("keydown", function (event) { var key = event.keyCode ? event.keyCode : event.charCode; if (key == 13) { if (!event) event = window.event; event.stopPropagation(); event.preventDefault(); event.returnValue = false; return false; } });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)