<script?type="text/javascript">
var?main?=?document.body;
//創建鏈接
????
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);
}
//?調用函數創建鏈接
????createa("http://www.xianlaiwan.cn","慕課網");
????
</script>
怎么在用JS新建的標簽里加hover屬性,或者onmouseover事件
竄天吼猴
2016-08-10 20:52:18