a.href = url; 这句我看不懂
<script type="text/javascript">
var main = document.body;
//创建链接
function createa(url,text)
{
var a=document.createElement("a");
a.herf=url;
a.innerHTML=text;
a.style.color="yellow";
main.appendChild(a);
}
// 调用函数创建链接
createa("www.baidu.com","ssss");
</script>