Question: Hello, please help me fix my CGI JavaScript web page. -------------------------------------------------------------------------------------------- ERROR MESSAGE: lottery1210.cgi:11 Uncaught TypeError: Math.Random is not a function at displayImages (lottery1210.cgi:11) at
Hello, please help me fix my CGI JavaScript web page.
--------------------------------------------------------------------------------------------
ERROR MESSAGE:
lottery1210.cgi:11 Uncaught TypeError: Math.Random is not a function at displayImages (lottery1210.cgi:11) at HTMLInputElement.onclick (lottery1210.cgi:29)
MY CODE:
#! /bin/bash echo "Content-type: text/html" echo ""
cat
var imagesArray=["http://jd-cit160a.ecs..edu/img/img_0.jpg","http://jd-cit160a.ecs..edu/img/img_1.jpg","http://jd-cit160a.ecs..edu/img/img_2.jpg","http://jd-cit160a.ecs..edu/img/img_3.jpg","http://jd-cit160a.ecs..edu/img/img_4.jpg","http://jd-cit160a.ecs..edu/img/img_5.jpg","http://jd-cit160a..edu/img/img_6.jpg"]
function displayImages() {
var num=Math.floor(Math.Random()*5);
document.cccc.src=imagesArray[num];
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
