Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CMPS 1 6 2 : Module 5 Programming Project * { font - family: sans - serif; } img { display: block; margin - left:

CMPS 162: Module 5 Programming Project
*{ font-family: sans-serif; }
img {
display: block;
margin-left: auto;
margin-right: auto;
}
div#div1,div#div2{margin:0,.25em;padding:.5em;}
div#outText{line-height:1.5em;min-height:1.5em;}
// DON'T CHANGE THE showText() FUNCTION
function showText(){
let iText = document.getElementById("inText");
let oText = document.getElementById('outText');
oText.innerText = iText.value;
}
// Remember to use double quotes, "", for attribute values in HTML and single quotes, '', around
// strings inside of JavaScript inside of attributes.
// e.g. Span text.
//--------//
// Events //
//--------//
console.log("Events");
//1. Change the link (the tag) in the HTML body below such that the
// message "A link was clicked" is alerted when the link is clicked.
// This can be accomplished by either updating the href attribute or adding the
// onClick attribute then coding the required javascript.
//--------------//
// Input Fields //
//--------------//
console.log("Input Fields");
//1. Change the background color to red for the input text field (the
// tag) in the HTML body when obtaining the focus and change it back to
// white when the focus is lost.
//2. Set the onkeyUp attribute of the input text field so that it calls the
// showText function. The showText function is already coded. Just get it to execute
// when typing in the text box.
//------------//
// Paragraphs //
//------------//
console.log("Paragraphs");
//1. Add the attribute to the paragraph below (the tag) so that the goPioneers
// function executes when the paragraph is clicked.
// Finish the goPioneers Function so that it changes the text in the paragraph
// below from "Hello World!" to "Go Pioneers!" when the user clicks the paragraph.
//2. Add the mouseOver attribute and insert JavaScript to conver the cursor to a pointer.
function goPioneers(){
}
//--------//
// Images //
//--------//
console.log("Images");
//1. Uncomment the img tag below.
//2. Set the source to https://www.pointpark.edu/_files/images/logo-vertical--green.svg.
//3. Add the onclick attribute and code javascript to make the img disappear when clicked.
//--------//
// Styles //
//--------//
console.log("Styles");
//1. Write the swapColors function called via the onclick attribute
// in the div tags below.
// Use the style of div1 and div2 to swap the colors of the divs.
// Hint: the style attribute that stores the background color is
// called backgroundColor.
Click here for a greeting!
Hello World!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part 3 Lnai 8726

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448440, 978-3662448441

Students also viewed these Databases questions

Question

4. Explain the strengths and weaknesses of each approach.

Answered: 1 week ago