创建元素节点createElement
var mian = document.body;
function createa(url,text) {
var alink=document.createElement("a");
alink.setAttribute("href",url);
alink.setAttribute("value",text);
alink.setAttribute("color","purple");
main.appendChild(alink); }
// 调用函数创建链接
createa("http://www.imooc.com","慕课网");
//哪里出问题了呢?