How to change FontSize By JavaScript?

后端 未结 5 1732
独厮守ぢ
独厮守ぢ 2020-11-27 21:45

This code is not working

var span = document.getElementById(\"span\");
span.style.fontsize = \"25px\";
span.innerHTML = \"String\";

<

5条回答
  •  感情败类
    2020-11-27 22:08

    try this:

    var span = document.getElementById("span");
    span.style.fontSize = "25px";
    span.innerHTML = "String";
    

提交回复
热议问题