帮我解读这段Javascript代码,谢谢

function jsonp(a, b, c) {
var d;
d = document.createElement('script');
d.src = a;
c && (d.charset = c);
d.onload = function() {
this.onload = this.onerror = null;
this.parentNode.removeChild(this);
b && b(!0); //---1
};
d.onerror = function() {
this.onload = this.onerror = null;
this.parentNode.removeChild(this);
b && b(!1); //---2
};
document.head.appendChild(d);
};

/*
这个函数啥用?1,2处代码是开关作用吗?

*/


宝慕林4294392
浏览 574回答 3
3回答

富国沪深

Jsonp 是跨域调用的。。。大致意思就是如何加载菜单节点。
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript