How can I prevent the Go button on iPad/iPhone from posting the form

后端 未结 6 1472
北海茫月
北海茫月 2020-12-31 00:52

I have a dynamic form that is to be displayed using an iPad.

This form has a couple of radio buttons and some text fields and one submit button.

In an iPad t

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-31 01:18

    Better answer is this. The other does not allow you to use a regular submit button. This attacks just the go button.

    $("body").keydown(function(){
        if(event.keyCode == 13) {
            document.activeElement.blur();
            return false;
        }
    });
    

提交回复
热议问题