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
  • 4,637
  • 41
  • 42
  • 47
Hai Truong IT
  • 3,951
  • 13
  • 53
  • 99

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
  • 97,363
  • 15
  • 155
  • 158