网络编程 
首页 > 网络编程 > 浏览文章

让IE8浏览器支持function.bind()方法

(编辑:jimmy 日期: 2025/5/11 浏览:3 次 )

IE8支持function.bind()方法

<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 
"htmlcode">
<!DOCTYPE html> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> 
<style type="text/css"> 
body, html {width: 100%;height: 100%;margin:0;font-family:"微软雅黑";} 
#allmap{width:100%;height:500px;} 
p{margin-left:5px; font-size:14px;} 
</style> 
<script type="text/javascript" src="/UploadFiles/2021-04-02/api">
上一篇:JavaScript字符串对象substring方法入门实例(用于截取字符串)
下一篇:jquery获取radio值(单选组radio)
在去年的5月23日,借助Intel Bridge Technology以及Intel Celadon两项技术的驱动,Intel为PC用户带来了Android On Windows(AOW)平台,并携手国内软件公司腾讯共同推出了腾讯应用宝电脑版,将Windows与安卓两大生态进行了融合,PC的使用体验随即被带入到了一个全新的阶段。