0
私はIEの問題を遭遇しました。私は説明を見つけることができません。私はクロムとFirefoxで警告を発するこのコードを持っていますが、それはIEではありません。私はGetDictBySubtitle()
に電話していない。 IEで奇妙な問題が発生する
<?php
header('Content-type: text/html; charset=UTF-8');
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Something</title>
<link rel="stylesheet" href="../css/bootstrap.css" type="text/css">
<link href="../css/dashboard.css" rel="stylesheet"/>
<script>
function GetDictBySubtitle() {
var userid = "000000000027";
var subid = "6317450";
postData = {"userid":userid, "subtitleid":subid};
$.ajax({
url: "/cgi-bin/get_movie_dictionary.py",
type: "post",
datatype:"json",
async : true,
data: {postData},
success: function(response){
alert(response);
}
});
}
function GetAccountData() {
var userid = "000000000027";
alert(userid);
}
</script>
</head>
<body>
<script>
window.onload = function() {
GetAccountData();
}
</script>
AN ALERT SHOULD BE DISPLAYED
</body>
<script src="../js/jquery.js"></script>
<script src="../js/jquery-ui.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/light-bootstrap-dashboard.js"></script>
</html>
は、私はまた、リクエストに
cache: false
を追加しましたが、私は、IEからすべてを削除し、それを再起動すると、アラートがまだ暗闇の中でどこかに潜んされているので、それは、キャッシュの問題ではありません。
注:IEでページをデバッグするとき、window.onloadブロックにGetAccountData() is undefined
エラーが発生します。
私はそれは私が殺すために時間を持っている場合、私はいつもマイクロソフトに数えることができるように素晴らしいIE 10、クロム50、Firefoxの45
を使用しています。
IEでポップアップを無効にしましたか? – Marcus
.onloadブロックにアラートを入れると、正常に表示されます。 – erdomester
'window.onload = GetAccountData;だけを試してください。 – Marcus