i have put the heml code in  this link  https://www.bartleby.com/questions-and-answers/computer-science-question/2dd76e1e-c1ac-4c6b-9e78-8b1c8a3f9add ----------- var img = document.getElementById("elephant"); var modalImg = document.getElementById("img01"); modal.style.display = "block"; console.log(modal.style.display); modalImg.src = "x.jpg"; // Get the element that closes the modal var span = document.getElementsByClassName("close")[0]; // When the user clicks on (x), close the modal span.onclick = function() { modal.style.display = "none"; } } function myBear() { var modal = document.getElementById("myModal"); // Get the image and insert it inside the modal - use its "alt" text as a caption var img = document.getElementById("bear"); var modalImg = document.getElementById("img01"); modal.style.display = "block"; console.log(modal.style.display); modalImg.src = "xl.jpg"; // Get the element that closes the modal var span = document.getElementsByClassName("close")[0]; // When the user clicks on (x), close the modal span.onclick = function() { modal.style.display = "none"; } } function myLion() { var modal = document.getElementById("myModal"); // Get the image and insert it inside the modal - use its "alt" text as a caption var img = document.getElementById("lion"); var modalImg = document.getElementById("img01"); modal.style.display = "block"; console.log(modal.style.display); modalImg.src = "xs.jpg"; // Get the element that closes the modal var span = document.getElementsByClassName("close")[0]; // When the user clicks on (x), close the modal span.onclick = function() { modal.style.display = "none"; } } function myPanda() { var modal = document.getElementById("myModal"); // Get the image and insert it inside the modal - use its "alt" text as a caption var img = document.getElementById("panda"); var modalImg = document.getElementById("img01"); modal.style.display = "block"; console.log(modal.style.display); modalImg.src = "xm.jpg"; // Get the element that closes the modal var span = document.getElementsByClassName("close")[0]; // When the user clicks on (x), close the modal span.onclick = function() { modal.style.display = "none"; } } function myMonkey() { var modal = document.getElementById("myModal"); // Get the image and insert it inside the modal - use its "alt" text as a caption var img = document.getElementById("monkey"); var modalImg = document.getElementById("img01"); modal.style.display = "block"; console.log(modal.style.display); modalImg.src = "xx.jpg"; // Get the element that closes the modal var span = document.getElementsByClassName("close")[0]; // When the user clicks on (x), close the modal span.onclick = function() { modal.style.display = "none"; } } myElephant(); myBear(); myLion(); myMonkey(); myPanda(); } // Get the element that closes the modal var span = document.getElementsByClassName("close")[0]; // When the user clicks on (x), close the modal span.onclick = function() { modal.style.display = "none"; // Get the modal var modal = document.getElementById("myModal"); // Get the image and insert it inside the modal - use its "alt" text as a caption var img = document.getElementById("lion"); var modalImg = document.getElementById("img01"); img.onclick = function(){ modal.style.display = "block"; modalImg.src = this.src; } // Get the element that closes the modal var span = document.getElementsByClassName("close")[0]; // When the user clicks on (x), close the modal span.onclick = function() { modal.style.display = "none"; } // Get the modal var modal = document.getElementById("myModal"); // Get the image and insert it inside the modal - use its "alt" text as a caption var img = document.getElementById("panda"); var modalImg = document.getElementById("img01"); img.onclick = function(){ modal.style.display = "block"; modalImg.src = this.src; } ------ can someone help me change the code to do the following  : add 6 small images with accompanying description assign values to the src attribute: image with path of "img/1.jpg" cannot be displayed in my shown ,i dont know why include alt attribute in element(s) use the element to separate the pictures scroll back to the top when selecting an up-arrow image - Failed to invoke email software when selecting the email hyperlink

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

 i have put the heml code in  this link 

https://www.bartleby.com/questions-and-answers/computer-science-question/2dd76e1e-c1ac-4c6b-9e78-8b1c8a3f9add

-----------

var img = document.getElementById("elephant");

var modalImg = document.getElementById("img01");
modal.style.display = "block";
console.log(modal.style.display);
modalImg.src = "x.jpg";
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
}

function myBear() {
var modal = document.getElementById("myModal");

// Get the image and insert it inside the modal - use its "alt" text as a caption
var img = document.getElementById("bear");

var modalImg = document.getElementById("img01");
modal.style.display = "block";
console.log(modal.style.display);
modalImg.src = "xl.jpg";
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
}

function myLion() {
var modal = document.getElementById("myModal");

// Get the image and insert it inside the modal - use its "alt" text as a caption
var img = document.getElementById("lion");

var modalImg = document.getElementById("img01");
modal.style.display = "block";
console.log(modal.style.display);
modalImg.src = "xs.jpg";
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
}

function myPanda() {
var modal = document.getElementById("myModal");

// Get the image and insert it inside the modal - use its "alt" text as a caption
var img = document.getElementById("panda");

var modalImg = document.getElementById("img01");
modal.style.display = "block";
console.log(modal.style.display);
modalImg.src = "xm.jpg";
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
}

function myMonkey() {
var modal = document.getElementById("myModal");

// Get the image and insert it inside the modal - use its "alt" text as a caption
var img = document.getElementById("monkey");

var modalImg = document.getElementById("img01");
modal.style.display = "block";
console.log(modal.style.display);
modalImg.src = "xx.jpg";
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
}

myElephant();
myBear();
myLion();
myMonkey();
myPanda();

}
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
// Get the modal
var modal = document.getElementById("myModal");
// Get the image and insert it inside the modal - use its "alt" text as a caption
var img = document.getElementById("lion");
var modalImg = document.getElementById("img01");
img.onclick = function(){
modal.style.display = "block";
modalImg.src = this.src;
}
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
// Get the modal
var modal = document.getElementById("myModal");
// Get the image and insert it inside the modal - use its "alt" text as a caption
var img = document.getElementById("panda");
var modalImg = document.getElementById("img01");
img.onclick = function(){
modal.style.display = "block";
modalImg.src = this.src;
}

------

can someone help me change the code to do the following 

:


add 6 small images with accompanying description

assign values to the src attribute: image with path of "img/1.jpg" cannot be displayed in my shown ,i dont know why
include alt attribute in <img> element(s)
use the <hr> element to separate the pictures

scroll back to the top when selecting an up-arrow image

- Failed to invoke email software when selecting the email hyperlink

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education