一只名叫tom的猫
<script language="javascript">function getjson(){var xmlReq ;try{xmlReq = new ActiveXObject("Microsoft.XMLHTTP");var web = "1.json";//json文件路径//异步方式xmlReq.open("GET",web,true);xmlReq.onreadystatechange = function(){if (xmlReq.readystate == 4){document.write(xmlReq.responseText);//对json的文件的操作}}xmlReq.send();catch(e){alert(e);}}</script>