Are you first timer at Why not join us and start exchange your programming knowledge with everyone. Register today!

jQuery - passing selected parameter value as URL

0 votes
added Mar 19 in jQuery by LC Marshal Captain (20,990 points)
<!DOCTYPE html>
<script src=""></script>
var lcDomain = "";
var value = "";
        // alert($(this).val());
        value = $(this).val();
        window.location.href = lcDomain+'&state='+value;

Select State:
<select name="state"> 
  <option value ="">Choose</option>
  <option value="Kuala%20Lumpur">Kuala Lumpur</option> 
  <option value="Selangor">Selangor</option> 



Please log in or register to response this reference. - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.