0
<script>
document.getElementById('style').style.color = "FFFF00";
document.getElementById('style').style.fontWeight = "bold";
document.getElementById('style').style.font= "italic bold 20px arial,serif";
</script>

Whenusing multi css, the code has an error. How to fix it in JavaScript?

karel
  • 3,880
  • 31
  • 37
  • 42
Hai Truong IT
  • 3,831
  • 13
  • 51
  • 97

1 Answers1

0

You could have defined the values in a class and do something like this:

document.getElementById("error_width").className = "your_class_name";

Hope it helps

Sudhir Bastakoti
  • 94,682
  • 14
  • 145
  • 149