开发者

How to change the behaviour of enter key in UIwebview?

开发者 https://www.devze.com 2023-01-19 23:07 出处:网络
i have a login page,in that after entering password when i hit \'enter\' key login should occur.above said condition works inbrowsers like chrome,firef开发者_如何学Pythonox,safari but not in iphone si

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

精彩评论

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