JS 动态引用JS
<script type="text/javascript"> var b= self.setInterval('getip(),1000') function getip(){ loadScript("http://pv.sohu.com/cityjson?ie=utf-8",function(){ $("#currIp").html(returnCitySN["cip"]) }); } function loadScript(url, callback) { var script = document.createElement("script"); script.type = "text/javascript"; if (typeof(callback) != "undefined") { if (script.readyState) { script.onreadystatechange = function() { if (script.readyState == "loaded" || script.readyState == "complete") { script.onreadystatechange = null; callback(); } }; } else { script.onload = function() { callback(); }; } }; script.src = url; document.body.appendChild(script); } </script>