search

Home  >  Q&A  >  body text

在函数中怎么给链接地址文本的字体设置大小

function createa(url,text)
{  var a=document.createElement("a");
    a.setAttribute("href", url); 
    a.innerHTML=text;
    a.style.color="blue";
    main.appendChild(a);
}
扔个三星炸死你扔个三星炸死你2989 days ago996

reply all(1)I'll reply

  • 巴扎黑

    巴扎黑2016-12-21 15:47:15

    a.style.fontSize = "字体大小"; (不能把fontSize写成font-size)

    reply
    0
  • Cancelreply