close

function testcall(){

 alert(this);

}

testcall.call('test', '')

testcall();               // test

call 把第一個參數當成this傳進去,之後的第二個參數是該function的參數

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 benjamin16pp 的頭像
    benjamin16pp

    程式筆記

    benjamin16pp 發表在 痞客邦 留言(0) 人氣()