저와 함께주십시오. 나는 JavaScript로 스스로 학습하는 새로운 프로그래밍이다. 이 프로그램에서 onmouseover 이벤트와 함께 작동하는 onmouseout 이벤트에 대한 올바른 코드를 알고 싶습니다. 최종 결과는 마우스가 onMouseover와 이벤트에 대한 행동의 영역을 떠날 때 HTML 페이지에 경고 상자를 숨기 얻을 것이다 :JavaScript 코드 - onmouseout 이벤트 onmouseover 이벤트에 의해 활성화 된 경고 상자의 누계 자
<! DOCTYPE html>
<html>
<head>
<title>Product Information</title>
<script>
function Product1Info() {
alert("Summer Product! On sale until Labor Day for $9.99.");
}
function Product2Info() {
alert("One of our best sellers! A bargain at $19.50.");
}
function Product3Info() {
alert("Everyone could use one of these at $1.99!");
}
</script>
</head>
<body>
<h1>Fran's Place<br>Shop our inventory!</h1>
We've got everything you need!<br>
<img src ="product1.jpg" height="300px" width="200px"
border="5" style="border-color:blue;" onmouseover="Product1Info()" /></div>
<img src ="product2.jpg" height="300px" width="200px"
border="5" style="border-color:red;" onmouseover="Product2Info()" /></div>
<img src ="product3.jpg" height="300px" width="200px"
border="5" style="border-color:black;" onmouseover="Product3Info()" /></div>
</body>
</html>
당신은 당신이 뭘 하려는지 할 수 없다 네이티브 경고 상자 - 참조 http://stackoverflow.com/questions/463368/javascript-close-alert-box –
예를 들어 절대 div와 같은 'visibility : hidden'과 같은 경고를 시도 할 수 있습니다. JS가 'visibility : visible'으로 변경되고 onmouseout이 숨겨진 상태로 돌아갑니다. –