Get string of url from javascript
<p>Hi i am using this code to get this path : <strong>http://192.168.1.5:83/staging/eleave/application/view/leave_approval.php</strong></p>

<pre><code>var url = document.location.toString();
</code></pre>

<p>Question is how to get this path only? : <strong>http://192.168.1.5:83/staging/eleave/application/</strong></p>
