<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>無標題文檔</title></head><body><script type="text/javascript">var main1 = document.body; ? ? ? ? //獲取//創(chuàng)建鏈接?function createa(url,text){? ? var alink = document.createElement("a"); ?//創(chuàng)建a? ? alink.setAttribute("href",url); ? ?//賦值? ? alink.innerHTML=text;? ? return alink;? ? ??? ??}// 調(diào)用函數(shù)創(chuàng)建鏈接main1.appendChild(createa("http://idcbgp.cn","慕課網(wǎng)"));</script>?</body></html>如上,函數(shù)里的參數(shù)URL,text是怎么樣跟里面的內(nèi)容聯(lián)系在一起的?看了半天也沒說明呀
關(guān)于函數(shù)的參數(shù)調(diào)用
朝花bu夕拾
2016-08-30 10:07:58