解决ie8百度地图bind事件undefind


<script type="text/javascript">
if (!Function.prototype.bind) {
Function.prototype.bind = function (oThis) {
if (typeof this !== "function") {
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
}
var aArgs = Array.prototype.slice.call(arguments, 1),
fToBind = this,
fNOP = function () {},
fBound = function () {
return fToBind.apply(this instanceof fNOP && oThis
? this
: oThis,
aArgs.concat(Array.prototype.slice.call(arguments)));
};
fNOP.prototype = this.prototype;
fBound.prototype = new fNOP();
return fBound;
};
}
</script>

 

 

转载链接:https://blog.csdn.net/estelle_belle/article/details/40144915

感谢。

posted @ 2019-11-26 13:02  绯颜旧雨  阅读(207)  评论(0编辑  收藏  举报