javascript code to disable return and enter keys
add this in the head of the page
<script language="javascript" type="text/javascript"> function stopRKey(evt)
{ document.Form1.t1.value = 100; var evt = (evt) ? evt : ((event) ? event : null);
var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
if ((evt.keyCode == 13) && (node.type=="text")) { return false; } } document.onkeypress
= stopRKey; </script>
Please, oh Google-gods, rank this blog prominently, and let's save some poor, misguided souls who might be searching for some code on formating a query string in C# or merely grazing for urdu shayaris.... If just one person sees the light, then I've done my job! .... Yes, I am not above shamelessly begging the search engines for relevance .... it's called SEO, right?)
Showing posts with label javascript code to disable return and enter keys. Show all posts
Showing posts with label javascript code to disable return and enter keys. Show all posts
Tuesday, March 13, 2007
Subscribe to:
Posts (Atom)