HTML
<input type="button" id="1" class="add" value="+" title="Add" onclick="set(this);"/>
JS
function set(obj){
alert(obj.id);
}
The code snippet provided above seems to have an issue.
My Requirement
I am looking for a solution that allows me to pass the id attribute of the button in the onclick function. Is there a way to achieve this?