博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
待研究
阅读量:4513 次
发布时间:2019-06-08

本文共 756 字,大约阅读时间需要 2 分钟。

// 动态加载script	$.load_script = function(xyUrl, callback) {		var head = doc.getElementsByTagName('head')[0];		var script = doc.createElement('script');		script.type = 'text/javascript';		script.src = xyUrl;		// 借鉴了jQuery的script跨域方法		script.onload = script.onreadystatechange = function() {			if ((!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) {				callback && callback();				// Handle memory leak in IE				script.onload = script.onreadystatechange = null;				if (head && script.parentNode) {					head.removeChild(script);				}			}		};		// Use insertBefore instead of appendChild to circumvent an IE6 bug.		head.insertBefore(script, head.firstChild);	};

  

转载于:https://www.cnblogs.com/xiaobaichuangtianxia/p/9132443.html

你可能感兴趣的文章
Sublime Text 3 使用小记
查看>>
总结Pycharm里面常用的快捷键
查看>>
util.promisify 的那些事儿
查看>>
配置phpstudy+phpstorm+xdebug环境
查看>>
BZOJ 1079 [SCOI2008]着色方案
查看>>
[Win8.1系统]双系统
查看>>
HDU 3899 树形DP
查看>>
继承上机作业
查看>>
设计模式 4/23 建造者模式
查看>>
Logging in Java
查看>>
leetcode算法:Distribute Candies
查看>>
机器学习之路: python 朴素贝叶斯分类器 MultinomialNB 预测新闻类别
查看>>
LINUX 忘记root密码
查看>>
json转换成Map
查看>>
MySQL查看当前用户、存储引擎、日志
查看>>
tpcc-mysql 系列二:进行TPCC测试
查看>>
将16进制的颜色值变成UIColor
查看>>
[转]magento 2 modes – 每种模式的特点及如何切换(翻译)
查看>>
求n的阶乘【VB代码实现】
查看>>
VSCode(Visual Studio Code) 自用插件
查看>>