Javascript examples for DOM HTML Element:Strong
The Strong object represents an HTML <strong> element.
You can access a <strong> element by using getElementById():
<!DOCTYPE html> <html> <body> <strong id="myStrong">this strong text</strong> <button onclick="myFunction()">set the color</button> <script> function myFunction() {//from w w w .j ava2 s . co m var x = document.getElementById("myStrong"); x.style.color = "red"; } </script> </body> </html>