Bladephp: Now with 8+ codeigniter, php, and laravel project 8+ php project From $37/Month From Rs. 2499/Month

onchange Event Jquery

by
Category:javascript
javascript jquery
onchange Event Jquery

The onchange event occurs when the value of an element has been changed. For radiobuttons and checkboxes, the onchange event occurs when the checked state has been changed. You may also like Jquery change event and Onsubmit event using ajax and return true but Form not submit using Jquery.

HTML Code

<select  onchange="myFunction($(this).val())">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
</select>

Jquery Code

<script type="text/javascript">
    function myFunction(value)
    {
        alert(value);
    }
</script>

0 Comments


Html code work in comment box


Related Post