I have some difficulty in understanding how to add an id to an url for sending a request to a server. In fact, my main problem is the position of quotation mark after the equal sign in the third open method. Why it is not used just after Math.random() or just after .asp. Since, if i place the quotation mark just after math.random(), it works but just before math.random() does not. I want to understand what the quotation mark changes here...
xhttp.open(method, url, async);
xhttp.send();
xhttp.open("GET", "demo_get.asp", true);
xhttp.send();
**xhttp.open("GET", "demo_get.asp?t=" + Math.random(), true);**
xhttp.send();
For example, I understand what is happening in the following url.
http://localhost/test.php?q=_&p1=_&p2=_
?
lets the server know what the ?_GET
variables start
q
, p1
, and p2
are parameters and _
is value