开发者

How to prevent submit and call a webservice on Enter keypressed in a textbox?

开发者 https://www.devze.com 2023-02-18 14:31 出处:网络
Is there a simple way to turn off form submit behaviour of the page when ENTER is pressed while I am focused to textbox? What I want to achieve is to call a web-service without submiting the pa开发者

Is there a simple way to turn off form submit behaviour of the page when ENTER is pressed

while I am focused to textbox? What I want to achieve is to call a web-service without submiting the pa开发者_Go百科ge when ENTER is pressed in a specific textbox in my aspx page?

Thanks!


Since this is tagged as JavaScript and not JQuery: http://www.cs.tut.fi/~jkorpela/forms/enter.html

That's the first link at http://www.google.ee/search?sourceid=chrome&ie=UTF-8&q=prevent+enter+on+forms+javascript

0

精彩评论

暂无评论...
验证码 换一张
取 消