Question

Create a web page containing a form allowing the user to enter variables for some type...

Create a web page containing a form allowing the user to enter variables for some type of calculation. Write a JavaScript program to perform the calculation. When the user clicks a button, your page displays the calculated results. For example, create a form that allows the user to enter variables to calculate the square footage of a rectangular room (area = length * width).

Homework Answers

Answer #1

<html>
<head>
<script>
function f1()
{
dqm1=document.form1.length.value;
dqm1=parseInt(dqm1);
y=document.form1.width.value;
y=parseInt(y);
area=dqm1*y;

alert("Area is "+area);
}
</script>
</head>
<body>
<form name="form1">
Enter length <input type="text" name="length" />
</br>
Enter width<input type="text" name="width" />
<input type="submit" value="click me" onclick="f1()">
</form>
</body>
</html>

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
8- Develop a personal web page for yourself using HTML, CSS, and Javascript Use the following...
8- Develop a personal web page for yourself using HTML, CSS, and Javascript Use the following HTML tags to design your webpage <h1>…</h1> , <h3>… </h3> , <h6>… </h6> , <p>…</p> , <b> …</b> , <i>…</ i>, <a…..> </a>, <img…..> , <table>….</table> , <div> …</div>, <form>…</ form>, <input type=“text”>, and <input type=“submit”> Use an external css to change the default style of your webpage. You must use at least one element selector, one id selector, and one class selector Using...
Create a C# program named PaintingEstimate whose Main() method prompts a user for length and width...
Create a C# program named PaintingEstimate whose Main() method prompts a user for length and width of a room in feet. Create a method that accepts the values and then computes the cost of painting the room, assuming the room is rectangular and has four full walls and 9-foot ceilings. The price of the job is $6 per square foot. Return the price to the Main() method, and display it.
Create a Python program that: Allows the user to enter a phrase or sentence. The program...
Create a Python program that: Allows the user to enter a phrase or sentence. The program should then take the phrase or sentence entered Separate out the individual words entered Each individual word should then be added to a list After all of the words have been place in a list Sort the contents of the list Display the contents of the sorted list with each individual word displayed on a separate line Display a message to the user indicating...
Create an application that calculates and displays the area of a rectangle in both square feet...
Create an application that calculates and displays the area of a rectangle in both square feet and square yards. The user will provide the rectangle’s length and width, both measured in feet. a. Prepare a Planning Chart for the application. b. Draw a sketch of an appropriate interface. Be sure to follow the GUI design guidelines covered in the chapter. The guidelines are summarized in Figure 2-20. (If you want to include an image in the interface, you can either...
Need this done using PHP code and not javascript Create a PHP form with a textarea...
Need this done using PHP code and not javascript Create a PHP form with a textarea field input and a submit button. The textarea field should be able to accept up to 250 characters. When the user clicks the Submit button, read the text in the textarea and display the following results on a web age. At the bottom of the page include a link back to the form. Number of characters: Number of words: (hint: explode the string into...
In the previous assessment, you used a static set of named variables to store the data...
In the previous assessment, you used a static set of named variables to store the data that was entered in a form to be output in a message. For this assessment, you will use the invitation.html file that you modified in the previous assessment to create a more effective process for entering information and creating invitations for volunteers. Rather than having to enter each volunteer and create an invitation one at a time, you will create a script that will...
For this assignment you'll be creating an application that has the user input a subtotal, tax...
For this assignment you'll be creating an application that has the user input a subtotal, tax rate and tip percentage and then displays the sales tax, tip amount and the total. You'll use JQuery instead of the getElementByX functions AND you will display all messages on the page (no alert or prompt boxes) The starter file is based off of the Lab 2 sales_tax application. Feel free to borrow code from your lab solution but realize you will need to...
Implement the Shape hierarchy -- create an abstract class called Shape, which will be the parent...
Implement the Shape hierarchy -- create an abstract class called Shape, which will be the parent class to TwoDimensionalShape and ThreeDimensionalShape. The classes Circle, Square, and Triangle should inherit from TwoDimensionalShape, while Sphere, Cube, and Tetrahedron should inherit from ThreeDimensionalShape. Each TwoDimensionalShape should have the methods getArea() and getPerimeter(), which calculate the area and perimeter of the shape, respectively. Every ThreeDimensionalShape should have the methods getArea() and getVolume(), which respectively calculate the surface area and volume of the shape. Every...
Compile and execute the application. You will discover that is has a bug in it -...
Compile and execute the application. You will discover that is has a bug in it - the filled checkbox has no effect - filled shapes are not drawn. Your first task is to debug the starter application so that it correctly draws filled shapes. The bug can be corrected with three characters at one location in the code. Java 2D introduces many new capabilities for creating unique and impressive graphics. We’ll add a small subset of these features to the...
Please read the article and answear about questions. Determining the Value of the Business After you...
Please read the article and answear about questions. Determining the Value of the Business After you have completed a thorough and exacting investigation, you need to analyze all the infor- mation you have gathered. This is the time to consult with your business, financial, and legal advis- ers to arrive at an estimate of the value of the business. Outside advisers are impartial and are more likely to see the bad things about the business than are you. You should...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT