我的代码如下所示..不确定是什么问题..
<script type="text/javascript"src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript">
jQuery.getJSON("http://dev9.edisbest.com/json.php?symbol=IBM&callback=?",
function(data) {
alert("Symbol: " + data.symbol + ", Price: " + data.price);
});
</script>
我的 JSON.PHP 页面代码如下
<?
header("Content-Type: application/json");
print json_encode(array("symbol" => "IBM", "price" => 91.42));
?>