Is there any way to find out that how many elements are going to be loaded in a webpage via javascript?
for example, I’m going to show the visitor something like this:
3 objects loaded, 10 ones remain! please wait.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If by ‘elements’ you mean DOM elements, no. You don’t know they exist until they are loaded, and it’s not very reliable to try to do DOM queries before it’s finished loading anyway.
If you mean ‘images’ or something along those lines, you could put something like this on your page:
And put this at the bottom of the page (below
</body>)