title: Get the size of a document when window resize
body: <p>I can find the size of window, when i resize my window.like this </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
      jQuery(window).resize(function () {
        var width = jQuery(window).width();
        var height = jQuery(window).height();
        console.log(width);
        console.log(height);
      })
  &lt;/script&gt;
  </code></pre>
  
  <p>Now i want to get the document size when i resize the window. How can i get the size every time when resize the window.</p>