0
表單提交在Android 4.0中不起作用。相同的代碼在較低版本的Android中工作正常。表單在Android 4.0及更高版本中提交問題
找到我的代碼供我們參考
<form id="login-form" data-ajax="false" method="get" action="POST">
<div id="userPassLogin">
<div id="loginFormButtondiv" style="display: none;">
<a href="#" id="loginFormButton" style="font-size: small">Back to Login</a>
</div>
<div id="loginDiv">
<div data-role="fieldcontain" style="border: none; margin-top: 10px;">
<input style="width: 95%" type="email" class="placeholder" name="login" id="username" placeholder="Login ID" data-theme="c" value="[email protected]" />
</div>
<div data-role="fieldcontain" style="border: none; margin-top: 0px;">
<input style="width: 95%" type="password" class="placeholder" name="password" id="password" placeholder="Password" data-theme="c" value="[email protected]" />
</div>
</form>
控制器代碼,
'submit #login-form' : 'onSubmit',
方法聲明和定義,
onSubmit : function(event)
{
alert('Inside the Form Submit');
if(isIOS){
nativeCommunication.callNativeMethod("networkcheck://isServerHosted?");
}
if(isAndroid || mHealth.util.webHostStatus){
alert('Inside the Form Submit');
event.preventDefault();
alert('Inside the Form Submit');
if(isAndroid){
alert('Inside the Form Submit');
this.doLogin();
}
}
},
任何幫助將是巨大的。
感謝
如果ü請接受這個答案是有益的。它會對其他人有用。 – Ranjithkumar
非常感謝您,但不幸的是,解決方案對我無效。我做了一些技巧來重新解決這個問題。 – Jabeer