Question

<!doctype html> <html lang=”en”>   <head>     <title>Principal Calculation Form</title>     <meta charset="utf-8"/>         

<!doctype html>

<html lang=”en”>

  <head>

    <title>Principal Calculation Form</title>

    <meta charset="utf-8"/>              

    <script src="code.js"></script>

  </head>

  

  <body onload="setFocus();">

    <div class="container">

                                      <div class="main">

                                      

                                        <form action="#" method="post" name="form_name" id="form_id" class="form_class" >

                                                                          <h2>--Principal Loan Form--</h2>

                                                                          

                                                                          <h5>Disclaimer: This software by no mean will precisely predict your mortgage through your lender company.  This Software will only assume the four items below in order to make an educated guess or prediction to your exact mortgage interests amount and the duration of your loan from your lender. <img src=”Hobbit.jpg” alt=”The image of my beloved Frodo” width="42" height="42">                                                                </h5><hr />

                                                                          

                                                                          <label>Principle :</label>

                                                                          <input type="text" name="prin" id="prin"  /><br/>                                  

                                                                          <br />

                                                                          

                                                                          <img src=”pig.jpg” alt=”This is an image of a large pig” />

                                                                          <input type="button" name="btn_id" id="btn_id" value="Submit" onclick="submitForm();"/>

                                        </form>

                                      </div>

                                    </div>

  </body>

</html>  

1. What is the ID value for Button Type Input element in the code from above ?   

2.  When the button gets clicked, what is the JS function, which process the form data

3.  What is the first JS Function which will execute when a browser loads the webpage in the above code?

4.  Identified ALL the attribute(s) in the element called <img> ?

5.  Identified ALL the value(s) in the element called <img> ?

Homework Answers

Answer #1

Solutions with explanation

Ans. 1: Here in the above code,ID value for Button Type Input element is "btn_id"

Given in the following line of code in bold
<input type="button" name="btn_id" id="btn_id" value="Submit" onclick="submitForm();"/>

Ans. 2: When the button gets clicked, the js function which procees the form data is submitForm().
The onclick attribute of the button will call the function submitForm().

Given in the following line of code in bold
<input type="button" name="btn_id" id="btn_id" value="Submit" onclick="submitForm();"/>

Ans. 3: The first JS Function which will execute when a browser loads the webpage in the above code is setFocus().
onload attribute of the body tag will execute the setFocus() function.

Given in the following line of code in bold
<body onload="setFocus();">

Ans. 4: In the above code img element has been used in two lines.
Attributes used in both the image elements are
src : which tells the about the source of the image. Locally or in internet
alt : it it used to tell the alternative text for an image when the image is not displayed due to some problem.
width : gives the width of the image
height : gives the height of the image

Given in the following lines of code in bold
<img src=”Hobbit.jpg” alt=”The image of my beloved Frodo” width="42" height="42">   
<img src=”pig.jpg” alt=”This is an image of a large pig” />

Ans. 5: img element has been used two times in the above code
Values of first img element
src=”Hobbit.jpg”
alt=”The image of my beloved Frodo”
width="42"
height="42"

Values of the second img element
src=”pig.jpg”
alt=”This is an image of a large pig”

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
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>All Pets Veterinary Hospital</title> <style> body { font-family: arial,...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>All Pets Veterinary Hospital</title> <style> body { font-family: arial, sans-serif; font-size: 100%; } /* outer container */    #wrapper { width: 960px; margin: 50px auto; padding: 0px; background-color: rgb(255, 255, 255); /* white */ border: 1px solid #000; /* black */ }    header h1 { text-align: center; }    nav { text-align: center; background: rgb(175, 196, 206); }    address figure { text-align: center; } </style> </head> <body> <div id="wrapper"> <!-- outer...
I have created images that I would like to have placed where the message is revealed?...
I have created images that I would like to have placed where the message is revealed? What is the best way to make it work. I tried to make it work and have not had much success. My images are saved as png's. Here is my original code. <!Doctype html> <html> <head> <meta charset="UTF-8"> <title>Dice Game</title> <link rel="stylesheet" type="text/css" href="demo.css"> </head> <body> <div class="row" align="center"> <div class="col-4"> <h3>Your Dice</h3> <img src="images/d1.png" width="100" height="100" alt="roll: 1" id="mydice1"> <img src="images/d1.png" width="100" height="100"...
Java Script I need the code to produce these 3 output. I can only get it...
Java Script I need the code to produce these 3 output. I can only get it to produce input #3 I need it to produce the following: // Input #1: // http://www.example.com // Output // http://www.example.com // Input #2: // http://www.example.com?name=r2d2 // Output // http://www.example.com // name: r2d2 // Input #3: // http://www.example.com?name=r2d2&email=r2d2%40me.com&human=no // Output // http://www.example.com // name: r2d2 // email: [email protected] // human: no THIS IS WHAT I HAVE SO FAR: HTML <!DOCTYPE html> <html lang="en"> <head> <meta...
I am trying to make a contact form to give input on another browser window. I...
I am trying to make a contact form to give input on another browser window. I am only getting the php code. I am trying to figure out why it won't post. Her is my html and php files: <!DOCTYPE html> <html> <head> <title>Contact</title> <link rel="stylesheet" href="main.css"> </head> <body>    <h1>Contact Form</h1> <nav> <ul> <li><a href="index.html">Home</a></li> <li><a href="page2.html">My PodCast</a></li> <li><a href="page3.html">Contact Me</a></li> <li><a href="page4.html">Resources</a></li> <li><a href="addressbook.html">Address Book</a></li> <li>Contact Form</li> </ul> </nav> <center><h2>Please fill out form</h2> <div id='container'> <div id='header'></div> <center><h3>Contact</h3>...
<?php    if(isset($_GET['submit'])){ //sanitize the input        /* Check the error from the input: if...
<?php    if(isset($_GET['submit'])){ //sanitize the input        /* Check the error from the input: if input from user is empty -> get an error string variable if input is not empty -> use preg_match() to match the pattern $pattern = "/^[1-9][0-9]{2}(\.|\-)[0-9]{3}(\.|\-)[0-9]{4}$/"; -> if it's a matched, get a success string variable */           } ?> <!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Bootstrap CSS --> <link...
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...
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...
This will be my third time submitting this question. THERE SHOULD BE NO USE OF CSS...
This will be my third time submitting this question. THERE SHOULD BE NO USE OF CSS OR SWITCH STATEMENTS IN THE JAVASCRIPT. Even though there is stylesheet in the HTML file do no create a new one. Project Standards: Students will use click events to capture user input. Students will use variables to store information needed by their application and keep track of their program’s state. Students will use conditionals to control project flow. Project Task You will be building...
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...
Part 1: Create the grid tic-tac-toe gameboard using buttons and iteration. Part 2: Human user gets...
Part 1: Create the grid tic-tac-toe gameboard using buttons and iteration. Part 2: Human user gets to select an open cell on the grid - place an X on that button selected Part 3: Check for a win using DOM iteration - new game option if row or column matching X pattern Part 4: Computer gets to select an open cell on the grid - place an O on that button selected Part 5: Check for a win using DOM...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT