i want to get the time at which page started loading and time at which it finishes loading.
i have written the following code.in the code i want to add componenets in the body and note the time at which components starts loading.the component is the functionaliy which takes time for loading.can you plaese help me to modify the code ,i dont understand how to note the starttime for the components in the body?
can anybody show it by taking simple elements(or forms buttons etc) in the body as the exapmle.
var start = new Date();
var end = new Date();
var difference = end.getTime() - start.getTime();
document.write("This timestamp is"+difference+"ms")