<div id="form">
<button type="submit" id="button">CLick me</button>
</div>
<div id="form2">
<button type="submit" id="button2">CLick me</button>
</div>
<script>
var _get=function(id){
return document.getElementById(id);
};
_get('button').onclick=function(){
alert('First button');
_get('form').innerHTML=_get('form').innerHTML;
_get('button').innerHTML='Click more';
};
_get('form2').onclick=function(e){
if(e.target.tagName.toLowerCase()!='button')
return;
alert('Second button');
_get('form2').innerHTML=_get('form2').innerHTML;
_get('button2').innerHTML='Click more';
};
</script>