Write 1 page with APA style on Supplemental Exercise. What is the purpose of using JavaScript on a website? JavaScript is a scripting language whish is used to enhance interactivity on websites. Websites that require user input use JavaScript in order to achieve various interactive functions like validation and animation. Ideally, JavaScript is in the form of functions that are usually embedded in the HTML file and the functions usually communicate with the Document Object Model in order to load new content, animate pages, and validate the pages and many other functions (Duffy, 2003). A webpage that has not used a scripting language is static and boring. Incorporating languages like JavaScript make the pages more dynamic and lively. This makes it more exciting for people to browse the various pages on a given website. However, it is important to note that JavaScript does not necessarily work across the board. For instance, there are some users that might disable JavaScript on their browsers. It is also possible to have devices accessing the webpage. For this reason, it is good programming to have a version that would load without JavaScript (Duffy, 2003). What is a specific example of a JavaScript application that will be beneficial on the site you are creating?Below is an example of a script that will ask the user to enter his/her name and print it out on the screen. Submit function myFunction(){var x.var name=prompt(“What is your name?”,”James Mathew”).if (name!=null) { x=”Hello ” + name + “! Welcome to my website!”. document.getElementById(“name”).innerHTML=x. }} What is the step-by-step process that would be followed to add the JavaScript described in your example to a website?The script above is to be embedded in the html file. The first step is to create the burron form element and then call the function as shown belowSubmit After that, you can now embed the script within the body elements of the html. You can now save the file and preview it in the browser. ReferenceDuffy, S. (2003). How to do Everything with JavaScript. OReilly & Associates, Osborne.

Don't use plagiarized sources. Get Your Custom Essay on
Write 1 page with APA style on Supplemental Exercise. What is the purpose of using JavaScript on a website? JavaScript is a scripting language whish is used to enhance interactivity on websites. Websi
Just from $10/Page
Order Essay

Order your essay today and save 10% with the discount code ESSAYHELP