I want to send the ID of an element to the function to know what button pressed it.
<input type="submit" id="foo" onclick="function(abcxyz)" value="abc" />
<input type="submit" id="foo" onclick="function(xyz)" value="x" />
function(str){
if(str == abcxyz){
//do this.
}
else if(str == xyz){
//do that.
}
}
or if it's possible, its okay that the value abc or x will be send to the function. so str = abc or str = x.