Count number of times Button is clicked in JavaScript and jQuery

Last Reply one year ago By pandeyism

Posted one year ago

is there any way to count number of clicks on a button using html control in using jquery.

Posted one year ago Modified on one year ago

Hi himani895,

Please refer below sample.


<script type="text/javascript" src=""></script>
<script type="text/javascript">
    var count = 0;
    function Count() {
        return false;
    <input type="submit" name="btnCount" value="Count" onclick="return Count();" id="btnCount" />
    <span id="lblShow"></span>