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...
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...
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...
Please linked both files. For this assignment you need to create a ToDo list using Javascript,...
Please linked both files. For this assignment you need to create a ToDo list using Javascript, along with HTML and CSS. Begin by creating a HTML page called todo.html. Then create a Javascript file called todo.js and link it in to the HTML page using a script tag. All Javascript for the assignment must be in the separate file. (For CSS, feel free to include styles in a style block at the top of the HTML page, or to link...
Create an application that will give valuable advice to future students from someone (you!) who is...
Create an application that will give valuable advice to future students from someone (you!) who is close to graduation. However, only end-users who have their credentials validated against the database (which uses encrypted passwords) are allowed entry. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- advice_ddl.sql CREATE DATABASE advice; USE advice; CREATE TABLE users ( id int primary key auto_increment, username varchar(255), password varchar(255) ); -- insert a row into the users table: -- username = foo -- password = bar INSERT INTO users (username, password) VALUES...
For this assignment, create an html page that has a login form. The form should have...
For this assignment, create an html page that has a login form. The form should have 3 input elements -- 1. This should have a type text for the user to enter UserName 2. This should have a type password (like text except cannot see the text that is typed in), for the user to enter password. 3. Submit button (type submit, as we did in class on 2/6). The form method should be set to POST and the action...