<html>
<head>
<title>버튼 클릭시 배경색 변경 소스</title>
<script>
<!--
function a()
{
    document.bgColor = "Navy"; //bgColor시 Color에서 반드시 대문자!
    document.fgColor = "Gold";
}
function b()
{
    document.bgColor = "White";
    document.fgColor = "Black";
}
-->
</head>
<body>
<form name="form1">
<input type="button" value="Navy" onClick="a()">
<input type="button" value="White" onClick="b()">

</body>
</html>
Posted by 김원준

TRACKBACK :: http://scriptd.ip.or.kr/trackback/233 관련글 쓰기

댓글을 달아 주세요

1  ... 29 30 31 32 33 34 35 36 37  ... 67 
하단 사이드바 열기


BLOG main image