标签:传递参数 ext rtb attribute nts func tno get tee
(function() {
var hm = document.createElement("script");
hm.setAttribute("src", "/manager/js/sta-tw.js");
hm.setAttribute("id", "staScript");
hm.setAttribute("appid", appId);
hm.setAttribute("userid", userId);
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<!-- <script id="staScript" type="text/javascript" src="/manager/js/sta-tw.js" userid="" appid="3"></script> -->
==============================================================================================
var appId = document.getElementById(‘staScript‘).getAttribute(‘appid‘);
var userId = document.getElementById(‘staScript‘).getAttribute(‘userid‘);
alert(appId)
标签:传递参数 ext rtb attribute nts func tno get tee
原文地址:http://www.cnblogs.com/xiangjune/p/7380581.html