开发者

How to change the behaviour of enter key in UIwebview?

i have a login page,in that after entering password when i hit 'enter' key login should occur.above said condition works in browsers like chrome,firef开发者_如何学Pythonox,safari but not in iphone simulator.In that when i hit 'enter' page reloads.plz help...


The following code helps me to bring out what I want.

$('#password,#username').bind('keypress', function(e)
    {
         if(e.keyCode == 10)
         {
             e.preventDefault();
             $('#id_login').click();
         }

    });
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜