Ex-5 In Figure 10-12, the JavaScript program will display a random image on the screen. When the user clicked the image,

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Ex-5 In Figure 10-12, the JavaScript program will display a random image on the screen. When the user clicked the image,

Post by answerhappygod »

Ex 5 In Figure 10 12 The Javascript Program Will Display A Random Image On The Screen When The User Clicked The Image 1
Ex 5 In Figure 10 12 The Javascript Program Will Display A Random Image On The Screen When The User Clicked The Image 1 (112.83 KiB) Viewed 56 times
Ex-5 In Figure 10-12, the JavaScript program will display a random image on the screen. When the user clicked the image, that program will randomly choose an image and display it on the screen. Since it is random so the displayed image may are may not be the same as the original image. Modify Figure 10-12 JavaScript program so that when use moves the mouse on top of the image (moueenter event), the image may move to random location (random x and random y) on the screen, it will also randomly pick and display an image (which may be different from the original image) on the screen. (Hint: the easiest way to do this exercise is to set the style.position of the image object to absolute and change its style.top and style.left to random values. Below showed some screen shots after mouse entered the image. File Co.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply