如果用setAttribute()来设置
var main = document.body;
function createa(url,text)
{
var link=document.createElement("a");
link.setAttribute("href","url");
link.setAttribute("innerHTML","text");
link.style.color="orange";
main.appendChild(link);
}
createa("http://www.imooc.com/","慕课网")
这样写错在哪里呢?