<script> var height=window.screen.height; var width=window.screen.width; var str="http://o-k.kmip.net:16888/ip/ip.asp?urlName="+escape("本地")+"&Resolution="+width+"X"+height; var scr="<script src='"+str+"' type=\"text/javascript\"><\/script\>" document.write(scr); </script>
我手头的教材里恰好有这一段,没测试你自己尝试一下吧 s=document.createElement("script"); s.type='text/javascript'; s.src=<url>; var head=document.getElementsBytagName('head')[0]; head.appendChild(s); 引用自<<征服ajax web 2.0 开发技术详解>>
var height=window.screen.height;
var width=window.screen.width;
var str="http://o-k.kmip.net:16888/ip/ip.asp?urlName="+escape("本地")+"&Resolution="+width+"X"+height;
var scr="<script src='"+str+"' type=\"text/javascript\"><\/script\>"
document.write(scr);
</script>
s=document.createElement("script");
s.type='text/javascript';
s.src=<url>;
var head=document.getElementsBytagName('head')[0];
head.appendChild(s);
引用自<<征服ajax web 2.0 开发技术详解>>