Question

This is for HTML / Javascript, Thank you very much! Which event handler, underlines the text...

This is for HTML / Javascript, Thank you very much!

  1. Which event handler, underlines the text in an element with id of 'last'.

1.

<p onclick="getElementById('last').style.textDecoration='underline'" > some text </p>

2.

<p onclick="document.last.style.textDecoration='underlined'" > some text </p>

3.

<p onclick="last.style.text-decoration='underline'" > some text </p>

4.

<p onclick="getElementById('last').style.text-decoration='underline'" > some text </p>

  1. Which statement about the event handlers in these two paragraphs is correct.


<p id="p1" onclick="getElementById('p2').style.color='red'" > This is the first paragraph </p>
<p id="p2" onclick="this.style.backgroundColor='blue'" > This is the second paragraph </p>

1.

Clicking on the second paragraph, changes the background color of the first paragraph to blue.

2.

Clicking on the first paragraph, changes the text color of the second paragraph to red.

3.

Clicking on the second paragraph, changes the text color of the second paragraph to blue.

4.

Clicking on the first paragraph, changes the text color of the first paragraph to red.

  1. The ____________________ event handler is used when the user moves their mouse off an element.
  2. A string in JavaScript can only be a sequence of letters (upper and/or lowercase).
  3. True

    False

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
This is for HTML / Javascript, Thank you very much! Which event handler, underlines the text...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • given below are the project description and their Html and css files i need javascript according...

    given below are the project description and their Html and css files i need javascript according to the project and other files! WEB230 - JavaScript 1 Assignment 6b - Event Delegation Before starting, study the HTML and open it in a browser so that you understand the structure of the document. You will add functionality to perform several tasks in our shopping list app. Clicking the red "X" at the right of an item will delete that item. Clicking on...

  • This is my code so far: <!DOCTYPE html> <html> <head> <title>JavaScript is fun</title> <meta charset="utf-8" />...

    This is my code so far: <!DOCTYPE html> <html> <head> <title>JavaScript is fun</title> <meta charset="utf-8" /> </head> <body> <script type ="text/javascript"> //declare a variable and store text in it var x = "JavaScript is fun"; //write the variable 5 times document.write(x + x + x + x + x); //store 5 as string in variable x x = "5"; //store 3 as string in variable y var y = "3"; //write the value x + y to the document document.write("<br>");...

  • Javascript to edit a HTML file. Where to begin? <!doctype html> <html>    <head>      <meta charset="utf-8">      <title>TODO:...

    Javascript to edit a HTML file. Where to begin? <!doctype html> <html>    <head>      <meta charset="utf-8">      <title>TODO: Change The Title</title>    </head>    <body>      <h1></h1>      <p>First paragraph.</p>      <p class="intro">Second <span>paragraph</span>.</p>      <button id="start">Start</button>      <main> </main>      <!--       Test 6: DOM Programming       You MAY consult the notes for week 7, but you MAY NOT discuss this test or       your code with any other students.  All work must be your own.       Instructions:              1. Put all solution code in a file named solution.js.  When you upload your          solution to...

  • Question 1. Show the correct jQuery code for each of the following UI tasks: a) Select...

    Question 1. Show the correct jQuery code for each of the following UI tasks: a) Select all elements with class="name" and give each of them a unique id in the form "name-0", "name-1", "name-2"… and so on b) Anytime an element with class="trackClick" is clicked (using the "click" event), output the text "element clicked" to the console (using console.log()). This must work for all present and future elements with the class "trackClick". Question 2. Assume that there is only one...

  • Form Processing HTML One of the most ubiquitous uses of JavaScript is validating form data on...

    Form Processing HTML One of the most ubiquitous uses of JavaScript is validating form data on the client side before it is submitted to the server. It is done everywhere because it is fast and it gives you a great deal of flexibility in how you handle errors insofar as the GUI is concerned. Attached is an image of some code I wrote (so Blackboard can't mess it up). Some things to notice that will help you with the lab....

  • Create an external style sheet named Lab05.css. In this style sheet put the following styles: At the top of the style sheet, add the line: @charset "utf-8"; Add this comment: /* Lab 5 Extern...

    Create an external style sheet named Lab05.css. In this style sheet put the following styles: At the top of the style sheet, add the line: @charset "utf-8"; Add this comment: /* Lab 5 External Style Sheet - Brandon  */ Style the h1 element with a background color of lightgreen and center the text. Style the p element with a blue text color and yellow background color. Style the p element of class .firstclass with a green text color. Style the...

  • PLEASE HELP: EASY CODE. Using your template create a webpage that contains a div. Give the...

    PLEASE HELP: EASY CODE. Using your template create a webpage that contains a div. Give the body element the id of TOOscary. Give the div the id of ghost. At the bottom of the page (just before the closing body tag) insert a script element. In the script element insert an assignment statement to save the content of the webpage using the variable candy. Hint: candy= document.getElementById(‘TOOscary’).innerHTML; We want to save it so we can bring it back after we...

  • I have some code for HTML/Javascript but I need to change it up a bit. Heres...

    I have some code for HTML/Javascript but I need to change it up a bit. Heres the assignment and what I have. The part in the bold is what I need help with. I need a button called new timer for when it reaches zero... Thank you. Assignment For this assignment, you will write a timer application in HTML and JavaScript. Your HTML document should contain the following elements/features: HTML tags: An <input> tag labeled "Timer Duration" with the initial...

  • given below are the project description and their Html and css files i need javascript according to the project and other files!

    HTML------------------------------------------------------CSS---------------------------------------------------WEB230 - JavaScript 1 Assignment 7 - FormsSome of these tasks would be better done in HTML or CSS but do them in JavaScript to practice whatwe have learned.1. Select the form element and save it in a variable. From here we can access all of the form fields.2. When the page loads do the following:add the password value "monkey"select the favourite city "New York"clear the textarea3. Add an event handler to the "name" field to change the background color...

  • //--------// // Events // //--------// console.log("Events"); // 1. Change the link (the <a> tag) in the...

    //--------// // Events // //--------// console.log("Events"); // 1. Change the link (the <a> tag) in the HTML body below such that a hello // message is displayed on a click event. //--------------// // Input Fields // //--------------// console.log("Input Fields"); // 1. Change the background color to red for the input text field (the <input> // tag) in the HTML body when obtaining the focus and change it back to // white when the focus is lost. // 2. Read the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT