Using change method in jquery

To call a method when value of an input element is changed we use change method. This method is only applicable to input, textarea and select elements.

<input type="text" id="txtName" />

<script type="text/javascript">
 $(function () {
        $("#txtName").change(function () {
            alert("Text has changed");
        });
    });
</script>

Comments

Popular posts from this blog

Check if ViewBag is null or doesn't exist

Using Progress Bar In C#

Jquery serer side datatables in asp.net