html button click only once
<script>
function doSomething () {
// Remove onclick
var element = document.getElementById("myDiv");
element.onclick = "";
// Do your processing here
alert("Something is done!");
// Re-enable after processing if you want
// element.onclick = doSomething;
}
</script>
<div id="myDiv" onclick="doSomething()">
Click Here To Do Something
</div>
Also in JavaScript:
- javascript textarea.append
- function para mter js
- how to tell this x = 12 + 30 when i read it in js
- javascript array to csv string
- jquery.mask.js
- node path resolve
- jquery table row calculation
- react callback
- discord.js find word inside comment
- float to currency js
- discord js stats command
- cache buster in angular application
- $('#mymodal').modal('show') not working
- javascript create object from key value pairs
- get serialize data javascript
- mongodb delete duplicate documents
- print in javascript
- js before unload
- Exception in thread "main" org.openqa.selenium.JavascriptException: cannot read getPlayerState
- parse integer javascript
- generate component with module angular 8
- row append and calculation in jquery datatable
- how to download and install ssms in windows 10
- bcd full form in electronics