Showing posts with label JavaScript. Show all posts
Showing posts with label JavaScript. Show all posts

Clear asp.net control in page using Jquery

No comments:


<script>
    $(document).ready(function () {
       $("#btnSubmit").click(function () {
          
          //Clear All textboxes
           $('input[type=text]').each(function () {
            $(this).val('');
          
           //Clear All Dropdowns and Listboxes
            $("select").each(function () {
             $(this).val('0');
            });

           //Clear Checkbox and Checkbox list Selection    
           $('input:checkbox').removeAttr('checked');

          //Clear Radio and Radiobutton list Selection
          $('input:radio').removeAttr('checked');
                })
            });
        });
    </script>

How to give alert message if no checkbox checked using javascript

No comments:
How to give alert message if no checkbox checked using javascript Introducation:
In this Example Iam Going to Explain Give  alert message for  when no checkbox checked  using JavaScript.


Description:

In this Example user  must select at least one checkbox if he press the submit button without selecting any checkbox. hw will get alert Message.


In this Example You must add javascript plug in "jquery-1.3.2.min.js"

How to restrict Alphabets in Textbox using javascript

No comments:

Introduction:  

In this Example Iam Going to Explain  how to Restrcit Alphabets  in Textbox using JavaScript.

Description: 

if user try to enter characters or alphabets in TextBox I don’t want to allow those characters in textbox for that I have written one JavaScript function to allow only numbers. 



 

How to restrict Alphabets in Textbox using javascript,stop alphabets in textbox using javascript