How can I execute script after entire webpage has loaded : <p>I have a simply script. For example:</p>

<pre><code>var rowCount = $('tr').length;
document.write(rowCount);
</code></pre>

<p>I want to load this after entire webpage has loaded. How can I do?</p>
