Url to jQuery

I wrote my first script but it does not work.

From a url:

http://www.mysite.com/page.aspx?var1=123&var2=987

     <script src="~/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
        <script language="javascript" type="text/javascript">
            $(document).ready(function() {
                var GET1=$("#TextBox22");
                var GET2=$("#TextBox23");
                GET1.val($.url("?var1"));
                GET2.val($.url("?var2"));
            });
        </script>

where am I going wrong?

jQuery doesn’t have any method called url() which is why your above code isn’t working, you will need to include the $.url() plugin which you can download from https://github.com/websanova/js-url.