Chrome以外のすべてのブラウザで完全に動作するjquery/AJAXのログインページがあります。それは私がProblems with jQuery getJSON using local files in ChromeでカバーされているChromeの問題にぶつかったようです - ある人はバグだと言う人もいれば、それは良いセキュリティだと言う人もいます。私はそれがイライラしていると言います。Chromeと--allow-file-from-filesファイル
サインインが実際に機能することを追加する必要があります。これは、AJAXinessが壊れていることです。解決方法は、-allow-file-from-filesをスタートアップ環境に追加することです。さて、これはChromeを使用しているサイト訪問者の問題をどのように解決するのでしょうか?
Chromeユーザーの場合、Chromeを使用しているユーザーを確認して「何かを使用する」と言うのは皮肉なことです。
誰もこの問題を回避する方法について考えていますか?それは価値がある何のため
は、ここでのコードは次のとおりです。
$(document).ready(function() { $("#login_form").submit(function() { //remove all the class add the messagebox classes and start fading $("#msgbox").removeClass().addClass('messagebox').text('Checking...').fadeIn(1000); //check the username exists or not from ajax $.post("/ajaxsignin.php",{email:$('#email').val(), password:$('#password').val(), remember:$('#remember').val(), rand:Math.random()} ,function(data) { if(data.success) //if correct login detail { ///////////////////////////////////////////////////////////////////// // if I put an alert() here, Chrome just doesn't see it but all other browsers do ////////////////////////////////////////////////////////////////////// document.getElementById("msgbox").innerHTML='Sign in successful'; document.getElementById("topmenutext").style.paddingTop='3px'; document.getElementById("topmenutext").innerHTML="BUG REPORT |sign out|contact|help"; var sPath = window.location.pathname; var sPage = sPath.substring(sPath.lastIndexOf('/') + 1); if(sPage == "register.php" || sPage == "index.php" || sPage == ""){ window.location.href='menu.php'; } else{ disablePopup(); } } else //if login failed { $("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox { //add message and change the class of the box and start fading $(this).html('Login failed - perhaps you need to register for an account').addClass('messageboxerror').fadeTo(900,1); }); } },"json"); return false; //not to post the form physically }); //now call the ajax also focus move from $("#submitbtn").click(function() { $("#login_form").trigger('submit'); }); });