JS: /*Dynamically add two buttons on page load and these buttons should call getImage1Data and getImage2Data in the JS file. Please don't use any libraries.*/
6) Write Sample code for dynamically creating image tag for first image to the div.
7) Add background to right div with src from 2nd request to cover parent background.
JavaScript File :
function getImage1Data(){
var image1Src;
var xhttp = new XMLHttpRequest();
xhttp.open("Get", 'some Url', false);
xhttp.send(null);
image1Src = xmlhttp.responseText; //Assume src = 'myFirstImg.png', 200x200 px
}
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment