我的现场 HTML 代码位于http://dev9.edisbest.com/PrinterManufacturers.htm?id=21
这在 FireFox 和 Chrome 和 show 中效果很好Status: Success
。请谁能告诉我为什么它在 IE9.0 上不起作用?
代码如下
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type='text/javascript'>
function hello(id){
var seriesurl = "http://t2json.tgoservices.com/818746/PrinterManufacturers/"+id+"/PrinterSeries"
$.ajax({
cache: false,
url: seriesurl
}).done(function(data, textStatus, jqXHR) {
$('#status').html(textStatus);
$.each(data.T2Json.PrinterSeries.Items, function(i,item) {
$("#content1").html('<a class="manufacturer" id="'+item.Id+'" href="#">'+ item.Name + '</a></br>');
});
}).fail(function(jqXHR, textStatus) {
$('#status').html(textStatus);
$('#content').html('(failed)');
})
}
$(document).ready( function() {
function getParameter(param) {
var val = document.URL;
var url = val.substr(val.indexOf(param))
var n=url.replace(param+"=","");
}
$('#time').html(new Date);
$('#status').html('');
$('#content').html('');
$.ajax({
cache: false,
url: $('#xhr_url').val()
}).done(function(data, textStatus, jqXHR) {
$('#status').html(textStatus);
$.each(data.T2Json.PrinterManufacturers.Items, function(i,item) {
$("#content").append('<a class="manufacturer" id="'+item.Id+'" onclick="hello('+item.Id+');" href="#">'+ item.Name + '</a></br>');
});
}).fail(function(jqXHR, textStatus) {
$('#status').html(textStatus);
$('#content').html('(failed)');
})
$('a .manufacturer').click(function(){
});
});
</script>
</head>
<body>
<input id='xhr_url' style='width:600px;' type='text' value='http://t2json.tgoservices.com/818746/PrinterManufacturers'/>
<div id='content1'></div>
<fieldset><legend>Time:</legend>
<div id='time'></div>
</fieldset>
<fieldset><legend>Status:</legend>
<div id='status'></div>
</fieldset>
<fieldset><legend>Content:</legend>
<div id='content'></div>
</fieldset>
</body>