當鼠標越過我希望它隱藏,當鼠標熄滅我希望按鈕重新出現按鈕的按鈕。但我需要使用onmouseover和onmouseout。如何在鼠標移過時使用onmouseover和onmouseout隱藏和取消隱藏按鈕?
<script>
function money()
{
\t document.getElementById("1").style.display = "none";
}
function cash()
{
\t document.getElementById("1").style.display = "block";
}
</script>
<input type="button" value="Hi" id="1" onmouseover="money('')" onmouseout="cash('')" >
看看文檔,看看你如何使用這些事件:http://www.w3schools.com/jsref/event_onmouseover.asp – TheDude
https://api.jquery.com/mouseover/會給你回答你需要@Mike – CAllen
聽起來像是誘騙用戶的好方法嗎? – adeneo