how to jquery event bind to function

Posted by sunglim on Stack Overflow See other posts from Stack Overflow or by sunglim
Published on 2010-06-09T01:10:31Z Indexed on 2010/06/09 1:12 UTC
Read the original article Hit count: 194

Filed under:
$(function(){

          $("#btnExcelRead").click(CheckValidation);

        });

        var CheckValidation = function() {
            if ($("#excelUpload").val() === "") {
                alert("Select file");
                return false;
            }
            if ($("$txtStartDate").val() === "") {
                alert("Check the start date!");
                return false;
            }
            if ($("$txtEndDate").val() === "") {
                alert("Check the end date!");
                return false;
            }
        }

here i made simple jquery code.

I want to bind function when btnExcelRead button click.

is this originally wrong way?

© Stack Overflow or respective owner

Related posts about jQuery