Js判断网页点击了哪个标签
摘要:Js判断网页点击了哪个标签
html代码
运行代码
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>webkfa.com提供</TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD> <BODY onclick="g_click(event)"> <button>button1</button><br/> <button>button2</button><br/> <button>button3</button><br/> <button>button4</button><br/> <SCRIPT LANGUAGE="JavaScript"> function g_click(e){ e = window.event || e; var srcElement = e.srcElement || e.target; alert("你点击了:"+srcElement.innerHTML); } </SCRIPT> </BODY> </HTML>
相关文章
最新发布
阅读排行
热门文章
猜你喜欢