http://www.thaicreate.com/jquery/jquery-ajax-jquery-getjson.html
http://www.thaicreate.com/jQuery-Demo/jQuerygetJSON.html
此代码不起作用?为什么?
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>ThaiCreate.Com jQuery Tutorials</title>
<script type="text/javascript"
src="http://www.thaicreate.com/jQuery-Demo/jquery-1.6.4.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#btn1").click(function () {
$.getJSON("http://www.thaicreate.com/jQuery-Demo/json.js", function (result) {
$.each(result, function (i, field) {
$("#div1").append(field + "<br / >");
});
});
});
});
</script>
</head>
<body>
<div id="div1"></div>
<input id="btn1" value="Load" type="button">
</body>
</html>