木子屋 Dnawo's BLOG

Chrome获取页面元素事件处理程序

👤 dnawo 📅 2012-05-21 👁 4973 👍 0 💬 0 🔄 来源:本站原创
测试页面:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>DOM Event - Mzwu.Com</title>
</head>

<body>
<a href="#" id="Link1">Link</a>
<script type="text/javascript">
document.getElementById("Link1").onclick=function(){
	alert("hello");
	return false;
};
</script>
</body>
</html>

Chrome获取click事件处理程序:

图片

Firefox下Firebug不太好用:

图片

评论(0)

暂无评论。

验证码
评论需审核通过后显示
← 上一篇 中国联通福建公司宽带咨询 下一篇 → GreaseMonkey脚本:淘宝宝贝价格批量设置工具