注意获取的标记都以大写表示,如"TD","TR","A"等
<script> <BR>function Get_srcElement(evgl) <BR>{ <BR> var srcElement="" <BR> //判断是IE 还是Firefox <BR> var evg=evgl.srcElement?evgl.srcElement:evgl.target; <BR> srcElement = srcElement + "\n" + "button_001_id----event.srcElement.id : " + evg.id <BR> srcElement = srcElement + "\n" + "input---event.srcElement.tagName : " + evg.tagName <BR> srcElement = srcElement + "\n" + "button---event.srcElement.type : " + evg.type <BR> srcElement = srcElement + "\n" + "单击查看---event.srcElement.value : " + evg.value <BR> srcElement = srcElement + "\n" + "button_001_Name---event.srcElement.name : " + evg.name <BR> srcElement = srcElement + "\n" + "button_001_Class---event.srcElement.className : " + evg.className <BR> //IE 支持parentElement FireFox支持parentNode <BR> srcElement = srcElement + "\n" + "form_001---event.srcElement.parentElement.id : " + evg.parentNode.id <BR> srcElement = srcElement + "\n" + "event.srcElement.getattribute : " + evg.getAttribute <BR> alert(srcElement); <BR>} <BR></script>