Count number of times Button is clicked in JavaScript and jQuery

Last Reply 8 months ago By pandeyism

Posted 8 months ago

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

You are viewing reply posted by: pandeyism 8 months ago.
Posted 8 months ago Modified on 8 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>