JavaScript
[JavaScript] Window alert() Method
sagesse2021
2021. 11. 5. 23:15
반응형
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
alert("문서안에 자바스크립트");
</script>
</head>
<body>
<h1>js1/test1.html</h1>
<input type="button" value="버튼"
onclick="alert('버튼클릭')">
<input type="button" value="버튼2"
ondblclick="alert('더블클릭')">
<input type="button" value="버튼3"
onmouseover="alert('마우스오버')">
</body>
</html>
<input type="button" value="button1" onclick="alert('버튼 클릭')">
<input type="button" value="button2" ondblclick="alert('더블클릭')">
<input type="button" value="button3" onmouseover="alert('마우스오버')">
//button1을 클릭하면 버튼클릭 창띄우기
//button2를 더블클릭하면 더블클릭 창 띄우기
//button3에 마우스 올리면 마우스오버 창 띄우기
반응형