足球游戏_中国足彩网¥体育资讯$

让ie8浏览器支持function.bind()方法
来源:易贤网 阅读:1504 次 日期:2016-06-15 09:28:07
温馨提示:易贤网小编为您整理了“让ie8浏览器支持function.bind()方法”,方便广大网友查阅!

ie8支持function.bind()方法

?123456789101112131415161718192021 <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>

主要解决“百度地图”官网上的例子的bug,摘取如下代码:

?12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 <!doctype html> <html> <head> <meta http-equiv=content-type content="text/html; charset=gbk""c_nrgg">

中国足彩网信息请查看脚本栏目
易贤网手机网站地址:让ie8浏览器支持function.bind()方法
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!
关于我们 | 联系我们 | 人才招聘 | 网站声明 | 网站帮助 | 非正式的简要咨询 | 简要咨询须知 | 新媒体/短视频平台 | 手机站点

版权所有:易贤网