-1
<html>
<head>
<style>
body{
background-color:#6badf6;
}
#button-layout{
background-color: #3b81cf;
width:100px;
height:40px;
border-radius:10px;
margin-left:50%;
margin-top: 25%;
}
#button-name{
font-family: verdana;
font-size: 14px;
color: white;
padding-left: 22px;
padding-top: 11px;
}
#button-name:hover{
cursor: pointer;
}
</style>
<script>
function change-content(){
document.getElementById('button-name').innerHTML = ">";
}
</script>
</head>
<body>
<div id="button-layout">
<h3 id="button-name" onmouseover="change-content()">Submit</h3>
</div>
</body>
</html>
我使用div標記創建了一個按鈕。它實際上並不是一個按鈕,但它看起來像一個按鈕。 這裏我想將h3標籤的內容更改爲'>'這個符號,當鼠標懸停在它上面時。怎麼做?更改h3標記內容
我在javascript中編寫代碼來更改h3內容,但它不會顯示任何影響?我不知道爲什麼?
它應該是'function'而不是'發佈前funtion' – 2015-04-03 07:52:35
ATLEAST調試碼。 – 2015-04-03 07:53:08