<script type="text/javascript">
window.onload = function(){
var element = document.getElementsByName('form')[0];
var children = element.childNodes, i = children.length;
if(element.hasChildNodes()){
while(i--){
if(children[i].tagName != undefined){
children[i].onclick = function(){
alert(this.tagName);
};
}
}
}
};
</script>
<form name="form">
<input type="button" value="click"/>
<select>
<option>click</option>
</select>
</form>