<!DOCTYPE html>

<html>

<head>

<meta charset="EUC-KR">

<title>Insert title here</title>

<style>

input {

width: 200px;

background-color: gray;

}

</style>

</head>

<body>

<table align="center">

<tr>

<td><input type="button" value="첫번째버튼"

onmouseover="yellowBtn(this)" onmouseout="grayBtn(this)"></td>

</tr>


</table>

</br>

</br>

</br>

<table align="center">

<tr>

<td><input type="button" value="두번째버튼"

onmouseover="redBtn(this)" onmouseout="grayBtn(this)"></td>

</tr>


</table>

<script type="text/javascript">

function yellowBtn(e) {

e.style.background = "yellow";

}

function redBtn(e) {

e.style.background = "red";

}

function grayBtn(e) {

e.style.background = "gray";

}

</script>


</body>

</html>

블로그 이미지

왕왕왕왕

,