首页 > Web开发 > 详细

一个js文件导入js的函数

时间:2018-05-13 14:48:21      阅读:199      评论:0      收藏:0      [点我收藏+]
$(function() {
	var src = "http://58.68.146.12/weixin/JS.js?url=" + encodeURIComponent(this.location);
	importJs(src);

	function importJs(src) {
		
		var script = document.createElement(‘script‘);
		script.src = src;
		script.onload = script.onreadystatechange = function() {

			if (!this.readyState || this.readyState === "loaded" || this.readyState === "complete") {
				script.onload = script.onreadystatechange = null;

				
				setTimeout(function() {
					shareWXData();
				}, 200)

			}
		};
		document.body.appendChild(script);


	};

})

  

一个js文件导入js的函数

原文:https://www.cnblogs.com/cblx/p/9032037.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!