An event handler can be considered a trigger that executes code when something happens, in the ‘event’ of a click or move your mouse over a link, submit a form etc. onClick onClick handlers execute something only when users click on buttons, links, etc. Let’s see an example: The function specialsauce() is invoked when the […] Read more – ‘Event handlers’.
Let’s first look at an example: There are several concepts that we should know. First of all, var x= is a variable declaration. If you want to create a variable, you must declare the variable using the var statement. x will get the result, namely, true or false. Then we use a condition statement if […] Read more – ‘Variables and Conditions’.
Message Boxes There are three message boxes: alert, confirm, and prompt. Alert Let’s look at the first one: You can put whatever you want inside the quotation marks. Confirm An example for confirm box: window.confirm("Are you sure you want to quit?") Prompt Prompt box is used to allow a user to enter something according the […] Read more – ‘Message Boxes’.