Paper Writing Services Generate a random number between 0 and the length of ts first array. c. Generate a second random number, ts time between
Abstract |
---|
0 and the length of the array. Use the confirm box to ask, “Want to know what I tnk?” If the user clicks “ok” use document.write to write out the insult in the array corresponding with the random number. If the user clicks “cancel”, use document.write to say, “Honestly, I like you.” 2. (4 pts) Write a web |
1.Write a web page (or add to your existing web page) a script that contains an array of insulting sentences. Now generate a random number between 0 and the length of the array. Use the confirm box to ask, “Want to know what I tnk?” If the user clicks “ok” use document.write to write out the insult in the array corresponding with the random number. If the user clicks “cancel”, use document.write to say, “Honestly, I like you.” 2. (4 pts) Write a web page (or add a script to the current web page) with an array of colors. You may either use hex numbers or basic color names (notng exotic, or the browser won’t know it). a. Now create a second array, ts time of border styles (solid, dashed, etc.). b. Generate a random number between 0 and the length of ts first array. c. Generate a second random number, ts time between 0 and the length of ts second array. d. Use document.write to create a new header, with a border that’s 10px wide, the border color of the random number in the first array and the border style of the random number in the second array. 3. (4 pts) Write a web page, or modify your existing web page so that the html part contains an image, with the width and height set appropriately. a. Create a script with a prompt, “Do you want to see a cat or a dog?” (You can pick the tngs you want to give the user a choice of seeing – it doesn’t have to be a cat or a dog). b. Depending on their answer, use getElementById to change the image to a cat or a dog (or whatever you chose), along with adjusting the width and height to be appropriate to the new image. 4. (4 pts) Write a web page with the html part containing an image on it (or alter the current web page so that it contains an image.) a. Then write a script that contains an array of pictures. b. Create a second array with appropriate alt tag sayings corresponding to the images in the first array (e.g., if firstarray[1]=”zombies.jpg”, secondarray[1] should be set to “a picture of a bunch of zombies searcng for brains”. Ts second array should be the same length as the first array c. Now, inside the script, generate a random number between 0 and the length of the array. d. Use getElementById to change the web page’s image to show the picture at the random number in the array, and change the alt tag of the image as well (you check ts by running your pointer over the image – it should show up.) 5. (4 pts) Write a web page (or modify your existing web page) so that it contains an unordered list of 3 items (you choose the topic – maybe a playlist, or books, or anytng you want). a. In your script, create an array of at least 6 items on a topic of your choice – it can be the same topic as the original list in the page, or on a new topic b. Use the confirm box to ask, “Generate a new list?” c. If the user clicks “ok”, generate 3 random numbers between 0 and the length of the array. Use an if condition to check to make sure each random number is unique (you want each of the 3 random numbers to be different.) d. Now use innerHTML to modify your list to hold 3 new items from the array, based on the random numbers generated. 6. (2 pts) In your web page, create a paragraph with an id. Inside the paragraph, include a link to the spca. The link should not have an id. a. Now create a script. In the script, use a confirm box to ask, “Change link?”. b. If the user clicks “ok”, change the link to be to the humane society.
Sample references |
---|
|
Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.
Click Here to Make an Order Click Here to Hire a Writer