这部分代码适用于所有浏览器,但不适用于 IE。你能帮我解决这个问题吗?
function getData(userId, instrumentId, minStep) {
alert(1); // worked!
console.log(userId, instrumentId, minStep);
$.ajax({
type: "POST",
url: '/controllers/ajax.php',
data: "instrument=" + instrumentId + '&user=' + userId,
dataType: 'json',
cache: false,
success: function(msg) {
alert(2); // doesn't work
document.getElementById("chart").dataFromJS(msg, minStep); // "chart" - id of flash player object loaded using swfobject
}
})
}