remove everything after a certain character
<p>Is there a way to remove everything after a certain character or just choose everything to that character, either way. my scenario is like this that its always gone be different amount of characters and im getting the value from a href and up to the ? </p>

<pre><code>like /Controller/Action?id=11112&amp;value=4444
</code></pre>

<p><strong>EDIT</strong><br />
I want the href to be <code>/Controller/Action</code> only, so i remove everything after the ?</p>

<p>im using this now</p>

<pre><code> $('.Delete').click(function (e) {
            e.preventDefault();
            var id = $(this).parents('tr:first').attr('id');                
            var url = $(this).attr('href');
            alert(url);
</code></pre>
