Count number of times Button is clicked in JavaScript and jQuery

Last Reply 9 months ago By pandeyism

Posted 9 months ago

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

Posted 9 months ago Modified on 9 months 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>