JS can change the text located on this line dynamically with the click of a .--The code to change text with a button is located below--
<div id="js_introduction1">JS can change the text located on this line dynamically with the click of a
Notice how JS, uses the getElementById function to change the innerHTML, which is what
is hard coded in the element, to change the value of the DOM element. JS can be used to change the
HTML styles of a web application; CSS.
text will go here
<button type="button" onclick='document.getElementById("abc1").style.fontSize = "25px";
document.getElementById("abc2").innerHTML = "Text that will appear on the element below"'>BTN-Text</button>.</p>
<p style="margin-left: 50px;" id="abc2"></p>
The code to hide the text within an element is located below. Once the button is clicked, the element marked with id tutorial1 will revert back to a null state.
<h2>JS can be used to hide elements</h2>
<button type="button" onclick="document.getElementById('tutorial1').style.display='none'">Hide</button>
The code to show hidden elements is located below. The element id names must match up in order for the elements information to changed.
<p id="tutorial2" style="display:none;">BOOOOoooOOooOooOOoo..</p>
<button type="button" onclick="document.getElementById('tutorial2').style.display='block'">Click here</button>
Next, we will look
Just follow the buttons to continue the tutorial, Guest