how to get on click id in event
<button id="1" onClick="reply_click(this.id)">B1</button>
<button id="2" onClick="reply_click(this.id)">B2</button>
<button id="3" onClick="reply_click(this.id)">B3</button>
<script type="text/javascript">
function reply_click(clicked_id)
{
alert(clicked_id);
}
</script>
Also in JavaScript:
- founder of js
- lambda expressions
- javascript last index
- js canvas pixel art
- express get full url
- how to hide javascript element by class
- array methods in javascript
- datatable set row id
- documenting functions javascript
- jquery form id submit
- array sort by alphabetical javascript
- javascript to uppercase
- js tolowercase use
- jquery set select value
- draw point p5js
- lootie file in react
- javascript fetch get data from promise
- play sound with keydown javascript
- dataset js
- vue get height of element ref
- new date() javascript
- shuffle json array javascript
- keep-alive vuejs router
- javascript convert to boolean