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
  • 5,489
  • 46
  • 45
  • 50
Hai Truong IT
  • 4,126
  • 13
  • 55
  • 102

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
  • 99,167
  • 15
  • 158
  • 162