Monday, 6 November 2017

Change Selected Item Seleted

<select id="drpType" name="drpType" class="form-control" onchange="TypeChange();">
            <option value="0">--select--</option>
            <option value="Adhoc">Adhoc</option>
            <option value="Dedicated">Dedicated</option>
        </select>

<script type="text/javascript">
   
        function TypeChange()
        {         
            var selectedItem = $("#drpType option:selected").val();
            $("#drpType > [value='" + selectedItem + "']").attr("selected", "true");

        }
    </script>

No comments:

Post a Comment

React Hooks - custom Hook

  v CustomHook Ø React allows us to create our own hook which is known as custom hook. Example – 1 localStorage Demo Step-1 Create ...