<script?type="text/javascript">
var?main?=?document.body;
//創(chuàng)建鏈接
????
function?createa(url,text)
{
????var?a?=?document.createElement("a");
????a.href?=?url;
????a.text?=?text;
????a.style.color?=?"black";
????a.style.textDecoration?=?"none";
????main.appendChild(a);
}
//?調(diào)用函數(shù)創(chuàng)建鏈接
????createa("http://idcbgp.cn","慕課網(wǎng)");
????
</script>
怎么在用JS新建的標(biāo)簽里加hover屬性,或者onmouseover事件
竄天吼猴
2016-08-10 20:52:18