<script>
var o = {color:"red"};
var h = {color:"yellow"};
function sayColor(){
alert(this.color);//this的指向:red
}
var objectSay = sayColor.bind(o);
objectSay();
</script>
<script>
var o = {color:"red"};
var h = {color:"yellow"};
function sayColor(){
alert(this.color);//this的指向:red
}
var objectSay = sayColor.bind(o);
objectSay();
</script>