日期:2014-05-16 浏览次数:20332 次
<!DOCTYPE HTML> <html> <head> <meta charset="gb2312" /> <title></title> </head> <body> <div id="test"></div> <script> var obj = document.createElement('script'); obj.src = "jsonp.php"; document.getElementsByTagName('head')[0].appendChild(obj); function jsonCallBack(json){ alert( json[0].name ); document.getElementById('test').innerHTML = json[1].name; } </script> </body> </html>