[Solved] prevent double click on button in javascript


Use the button element, it will provide the functionality you are after. It can be styled to look like an anchor. Less issues trying to get it working as intended across all browsers.

$("#submit").on("click",function(){    
    $(this).attr('disabled', true);
    console.log('disabled');
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button class="button" id="submit"> <span>&#10003</span> Submit report</button>

0

solved prevent double click on button in javascript