How can you embed jquery variable inside a href

How can you embed jquery variable inside a href

Hi,

Im trying to create a href tag with the prod-id and qty that the user entered.





  1.  $(document).ready(function ()
  2.     {
  3.           $('#qty1').blur(function()
  4.         {
  5.              var qqq = $('#qty1').val();
  6.             });
  7.     });

     

      Input field

  1. <input type="text" name="qty1" id="qty1" autocomplete="off">


       Id is part of a class... and contains the product code

  1. $product1->id

    

      The a href thats not working.. it must contain the Id and qty

  1. <a href=\"index123.php?qty1=" . javascript:(function(){$('#qty1').val();}."&prodid=" . $product1->id . "\">add me</a>