Pass hidden field value using Jquery
问题 I have a normal hidden Input field where I am generating random string . I need that to be appended to the URL where I am trying to post data to another page. I have done this and works pretty well. url:'Upload.html?field1=newvalue', This is my hidden input field <input type="hidden" id="randomdirectory"/> Now instead of newvalue in the query string I need to pass my random directory value . 回答1: easily accomplished just do the following var value = $("#randomdirectory").val(); url:'Upload