JQUERY

    셀렉트(select) change href 이벤트
    • 조회수 1,453
    • 작성일 2016-08-07
    •  
    $(document).ready(function(){
    $("#lyjMenu").change(function(){
     window.location.href = $(this).find("option:selected").attr("id") + '.html';
    });
    });


    <select id="lyjMenu">
      <option selected>Choose Demo</option>
      <option id="backgrounds">Background images</option>
      <option id="backgroundVideo">Background video</option>
    </select>

    • Comment 2023-03-24
    $category_location = "/search.php?left_idx=307&brand=korea&coxand="; onchange="location='<?=$category_location?>'+this.value"