javascript - How to update a get parameter in a url with jquery -


here code:

 <input type="date" name="date" id="date_input" value="<?php echo $_get['date']; ?>" class="date">    <a href="shopping_list.php?page_id=1&title=<?php echo $_get['title']; ?>&date=" id="back_button">back</a>

i need user puts date input put "date" part of url on shopping_list.php without page refreshing , needs changed live.

thanks in advance!

one solution jsfiddle:

$("#date_input").on("change", function(){      $("#back_button").attr("href", "shopping_list.php?page_id=1&title=<?php echo $_get['title']; ?>&date="+this.value); }); 

hope helps!


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -