<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
當前頁標籤活動頁面:事件
點了其餘頁標籤就是不活動頁了
事件原對象的屬性