JavaScript Buttons onClick Event getElementById

JavaScript AND OR in IF Statement to Check For Multiple Conditions Absolute Beginner

JavaScript AND OR in IF Statement to Check For Multiple Conditions

Sometimes you want to check if we meet 2 or more conditions in JavaScript. To accomplish this we use the OR “||”, AND “&&” statements within the IF condition. In the last lesson  we were checking the date. If a certain date met the condition we displayed something. What if we had a couple of Read More

JavaScript Buttons onClick Event getElementById

JavaScript Buttons onClick Event getElementById

In this tutorial we are going to use JavaScript Buttons onClick Event getElementById. First thing to know is that we can give any HTML element an id. Here are some examples, we are giving every one of the HTML elements an id of test. [code]<div id=”test”></div>[/code] [code]<h2 id=”test”></h2>[/code] [code]<p id=”test”></p>[/code] [code]<body id=”test”></body>[/code] We can target Read More