?? experiment8.htm
字號:
<html>
<head>
<title>experiment8</title>
<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
<style>
.Item {
cursor: hand;
font-family: verdana;
font-size: 20;
font-style: normal;
background-color: darkgray;
color: white
}
.Highlight {
cursor: hand;
font-family: verdana;
font-size: 20;
font-style: italic;
background-color: dimgray;
color: yellow
}
</style>
</head>
<body>
<div id=div1><span class=Item>Milk</span>
<span class=Item>Cookies</span>
<span class=Item>Eggs</span>
<span class=Item>Ham</span>
<span class=Item>Cheese</span>
<span class=Item>Pasta</span>
<span class=Item>Chicken</span></div>
<script>
function rollon() {
if (window.event.srcElement.className == "Item") {
window.event.srcElement.className = "Highlight";
}
}
div1.onmouseover=rollon;
//document.onmouseover = rollon;
function rolloff() {
if (window.event.srcElement.className == "Highlight") {
window.event.srcElement.className = "Item";
}
}
div1.onmouseout = rolloff;
//document.onmouseout = rolloff;
</script>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -