js 文件加载时候页面缓存的有关问题

js 文件加载时候页面缓存的问题意思:就是给js文件加上时间戳或者随机数script typetext/javascriptva

js 文件加载时候页面缓存的问题
意思:就是给js文件加上时间戳或者随机数

<script type="text/javascript">var t= Math.random();var js_path = "include/js/";function js_include(script){ var script = document.createElement('script'); script.src = js_path + script; script.language = 'javascript';script.type = 'text/javascript'; var head = document.getElementsByTagName('head').item(0); head.appendChild(script);} (function(){  var loadjs = function(){  var s = document.createElement('script');  s.src = "http://union.500wan.com/ushare/add.js";  s.type = "text/javascript";  s.charset="gbk";      var h = document.getElementsByTagName('head')[0];      h.appendChild(s);  }  if(/msie/i.test(navigator.userAgent)){  window.attachEvent('onload',function(){  loadjs();  });  } else {  window.addEventListener('load',function(){    loadjs();      },false);  }})()js_include("prototype.js?t=" + t);</script>