Create a new page in your website. In the script, use prompt methods to collect
ID: 3658953 • Letter: C
Question
Create a new page in your website. In the script, use prompt methods to collect three numbers from the user. Then, use alert methods to display the sum and the product of the three numbers. Note what happens if one or more of the inputs is not a number.Try to explain this behavior.Calculating a Table Decide on what table you will calculate in this Application and create a new, appropriately named, page in your website. Complete the XHTML code for the head and create a shell for the body.Write an appropriate headline and introductory paragraph and also the XHTML for the table and its header row. Link to this newly created page from your home page. In place of the data rows for the table, write aExplanation / Answer
JavaScript is a programming language that has become the de facto standard for enhancing and adding functionality to web pages. JavaScript performs client-side scripting, making web pages more interactive. Client-side scripting means that the code works only on the user’s computer, not on the server-side. JavaScript code is placed into web pages. The two major browsers contain JavaScript interpreters, which process and execute the code. JavaScript and Java are not the same language. JavaScript is considered to be much simpler than Java and the languages have different syntax, keywords and conventions. Java is considered to be more powerful than JavaScript. JavaScript provides for some relatively simple user interactions. JavaScript cannot write files to either the server or the client’s computer and cannot read files from the client’s computer. JavaScript does not have graphics capabilities. Unlike HTML, JavaScript is case sensitive. That means that it distinguishes between upper and lower case letters and considers the upper and lowercase version of the same letter to be different letters. Most JavaScript keywords use lowercase. 12.1 Object Oriented Programming Before getting into JavaScript, it is a good idea to get a grip on the sorts of objects that this language deals with. In addition to basic data types, such as numbers, characters and strings, JavaScript deals with objects. An object can be a complex structure containing a number of values or properties or even other objects. For example, a browser window itself contains a number of other objects like an HTML document, a titlebar, a menubar, a toolbar, optional scrollbars and a statusbar along the bottom. These are all properties of the browser window object in JavaScript. Another important object in JavaScript is the web page in which the JavaScript code is embedded. The current web page is a JavaScript document object. One property of a document is the background color, bgcolor. The background color of the current web page can be accessed using “dot” notation such as document.bgcolor. The document is in turn a property of the window object and can be accessed with window.document. Because the document object is frequently referenced in JavaScript, the first part of the reference is usually omitted and one references the document object directly. An object can also have methods and event handlers. These are functions that can access and change the properties of the object and detect user actions. One method for a document object is the write() method. Methods often have names that are or start with verbs. Note also that methods are followed by a set of parentheses which may or may not be empty, depending on the method. If the parentheses are not empty, the contents are called the ”parameters” or “arguments” of the method. Parameters provide additional information for use by the method. Methods are applied to objects with the “dot” notation. So, to use the write() method with the current document, one would write document.write(“Hello”).
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.