Passing Id attribute from a (JQuery) selector into (JavaScript's) document.getElementById(). Swapping out our Syntax Highlighter. i did and eddited your code! There are two ways: Recommended: Bind an event listener to the DOM object.
Don't forget that there are function/event arguments, but you must specify the parameters: In this way, the submission is halted, and so you can conditionalise it. @user1149244 In the JavaScript pane on jsFiddle click on "JavaScript" and then set "Load Type" to "No wrap - in