How Change The Link Form Action A Accordance With The ``? December 01, 2023 Post a Comment This form is search form. when I click the 'alfamart' or 'bca', I want the link change. like this, link: /en2/maps(alfamart)or(bca)/ in accordance with the Solution 1: You don't need to get value from URL, you can change form action by select box value. Baca JugaGoogle Analytics - Using Get Instead Of PostJavascript N Php W/ Select BoxesOnsubmit Method Doesn't Stop Submit$('.selectpicker').change(function(){ if($(this).val() == 'alfamart'){ $('form').attr('action','alfamart.html'); alert('action is alfamart.html'); } else { $('form').attr('action','BCA.html'); alert('action is BCA.html'); } });Copy<scriptsrc="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><formaction="/en2/maps"> Distination: <selectname="textSearchTerms"class="selectpicker"data-live-search="true"><optionvalue="alfamart">Alfamart</option><optionvalue="BCA">BCA</option></select><inputtype="submit"value="Search"></form>Copy Share You may like these postsHow To Make The Table Content Wil Shown Automaticly In Pop Up FormHow To Write A Javascript Function Inside The Functions.php Of Wordpress?Php Function Is Not Defined Error And Syntax Error Of Misplaced In Generated HtmlJquery Conflict! Shows White Screen On Post Edit Page For Wordpress Post a Comment for "How Change The Link Form Action A Accordance With The ``?"
Post a Comment for "How Change The Link Form Action A Accordance With The `