<html>
<head>
<title>demo</title>
<script type="text/javascript">javascript
function aa()html
{
alert("您点击的标记是:" + event.srcElement.tagName)
}
window.document.onclick = aa;java
window.onload = function() { 浏览器
document.title = "浏览器加载";
}
window.onfocus = function() {
document.title = "活动";测试
}
window.onblur = function() {
document.title = "不活动";
}
window.onscroll = function() {
document.title = "滚动条";spa
}
window.onresize = function() {
document.title = "改变了窗口尺寸:";htm
}</script>
</head>
<body>
<br>
<p>载入文档:</p>
<p>取得焦点:</p>
<p>失去焦点:</p>
<p>拖动滚动条:</p>
<p>变换尺寸:</p>
<div>测试div:</div>
<input>
<a href=#>test</a>
<br>
<span>
<a href="/" onmouseover="alert(event.srcElement.parentElement.tagName);">放在我上面</a></span>
</body>对象
</html>seo
当前页标签活动页面:事件
点了其余页标签就是不活动页了
事件原对象的属性