I need help with this assignment Web Frameworks: DOM exercises First, open the web page (.html) in your browser. There are twelve exercises defined in the JavaScript file (app.js). Each exercise...

1 answer below »

I need help with this assignment



Web Frameworks: DOM exercises


First, open the web page (.html) in your browser. There are twelve exercises defined in the JavaScript file (app.js). Each exercise corresponds to the “Problem” number displayed in the HTML file. Open the JavaScript file (app.js) and follow the directions indicated. You will create a function to complete exercise in the JavaScript file included (app.js). Test each problem by refreshing your web page and testing the results one by one.


Here is the code file:



app.js


function problemOne(event) {


const target = event.target;
// code here:
}


// reference the elment "#remove-me" and add an eventlistener for the click event:
// your code here:


/* ---------------------------------------- */


function problemTwo(event) {
const target = event.target;
// your code here:
}


// reference the elment "#remove-my-children" and add an eventlistener for the click event:
// your code here


/* ---------------------------------------- */




function problemThree(event) {


const target = event.target;
// your code here


}


// reference the elment "#remove-my-children-then-me" and add an eventlistener for the click event:
// your code here:


/* ---------------------------------------- */


function problemFour( event ) {


const target = event.target;
// your code here


}


// reference the elment "#add-children" and add an eventlistener for the click event:
// your code here:


/* ---------------------------------------- */


function problemFive({target}) {


const target = event.target;
// your code here


}


// reference the elment "#to-the-back" and add an eventlistener for the mouseup event:
// your code here:


/* ---------------------------------------- */




function problemSix({target}) {


const target = event.target;
// your code here


}


// reference the elment "#increment-child" and add an eventlistener for the click event:
// your code here:


/* ---------------------------------------- */


/* Maybe code goes here, if some scope is needed... */


function problemSeven(event) {


const target = event.target;
// your code here




}


// reference the elment "#increment-decrement" and add an eventlistener for the click event:
// your code here:


/* ---------------------------------------- */




function problemEight(event) {


const target = event.target;
// your code here


}


// reference the elment "#echo-user-input" and add an eventlistener for the keyup event:
// your code here:


/* ---------------------------------------- */


/* Maybe code goes here, if some scope is needed... */


function problemNine(event) {


event.preventDefault();
const target = event.target;
// your code here
}


// reference the elment "#paste-place" and add an eventlistener for the paste event:
// your code here:


/* ---------------------------------------- */


function problemTen(event) {
const target = event.target;
// your code here
}


// reference the elment "#show-hide" and add an eventlistener for the change event:
// your code here:


/* ---------------------------------------- */




function problemEleven( event ) {


event.preventDefault();
const target = event.target;
// your code here


}


// your code here


/* ---------------------------------------- */


function problemTwelve ( ) {


// your code here
}


// your code here

Answered Same DayJul 13, 2021

Answer To: I need help with this assignment Web Frameworks: DOM exercises First, open the web page (.html) in...

Kshitij answered on Jul 14 2021
133 Votes
function problemOne(event) {
const target = event.target;
alert(target.val);
}
// reference the elment "#
remove-me" and add an eventlistener for the click event:
// your code here:
/* ---------------------------------------- */
var x1 = document.getElementById("remove-me");
x1.addEventListener("click", problemOne);
function problemTwo(event) {
const target = event.target;
alert(target.val);
}
// reference the elment "#remove-my-children" and add an eventlistener for the click event:
// your code here
var x2 = document.getElementById("remove-my-children");
x2.addEventListener("click", problemTwo);
/* ---------------------------------------- */
function problemThree(event) {
const target = event.target;
}
// reference the elment "#remove-my-children-then-me" and add an eventlistener for the click event:
// your code here:
var x3 = document.getElementById("remove-my-children-then-me");
x3.addEventListener("click", problemThree);
/* ---------------------------------------- */
function problemFour(event) {
const target = event.target;
alert(target.val);
}
// reference the elment...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here