Question

The following code shows the head and body sections in an HTML file: <head> <script> function...

The following code shows the head and body sections in an HTML file:

<head>
<script>
function init() {
var x, y, z;
z = document.getElementById("abc").innerHTML;
y = "B";
x = "C";
document.getElementById("abc").innerHTML = x+y+z;
}
</script>
</head>
<body onload="init();">
<p id="abc">A</p>
</body>

What would be displayed on the browser when the above webpage is opened?

BC

CB

or

CBA

or

A

or

ABC

Homework Answers

Answer #1


Output would be displayed on the browser when the above webpage is opened is
CBA

So, answer is CBA

CBA
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>     <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...
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...
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...
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"...
I have trouble in my code with - Create and append the fancySheet link element to...
I have trouble in my code with - Create and append the fancySheet link element to the document head - Create and append figBox element to element with id box - Populate the figure box with preview images of the five fancy style sheets I don't understand what went wrong. New Perspectives HMTL5, CSS3, and JavaScript T12 Case Problem 1: New Accents Photography JavaScript File Event Listener Go to the na_styler.js file in your editor. Add an event listener that...
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...