<html>
<body>
<h3>A demonstration of how to access a B element</h3>
<p>Click the button to set the color of <b id="myB">this bold text</b> to red.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
var x = document.getElementById("myB");
x.style.color = "red";
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_b_get by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:04:32 GMT -->
</html>