為什么不顯示
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>無(wú)標(biāo)題文檔</title>
</head>
<body>
<script type="text/javascript">
var main = document.body;
//創(chuàng)建鏈接
function createa(url,text)
{ ?var a=document.createElement("a");
? ? a.setAttribute("href", url);?
? ? a.innerHTML=text;
? ? a.style.color="blue";
? ? a.style.fontSize = "20px";
? ? main.appendChild(a);
}
// 調(diào)用函數(shù)創(chuàng)建鏈接
createa("http://idcbgp.cn","慕課網(wǎng)");
? ??
}
2017-01-18
大兄弟,你結(jié)尾多打了一個(gè) } ?,你刪除掉 試試看,這玩意多一個(gè)或者少一個(gè)符號(hào)都不行的