<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript">
        function CheckAgree() {
            // 체크박스가 체크되었는지 확인
            if (document.getElementById("chkAgree").checked) {
                return true; // Summit 진행
            }
            else {
                alert("동의하셔야합니다.");
                document.getElementById("chkAgree").focus(); //
                return false; // onsubmit 이벤트 중지
            }

        }

        function SetDis() {
            document.getElementById("btnSubmit").disabled =
                    !document.getElementById("chkAgree").checked;
        }
    </script>
</head>
<body>
    <form id="Frm" name="frm" action="LoginProcess.aspx" method="post" onsubmit="return CheckAgree();">
        약관에 동의하시겠습니까?
        <input type="checkbox" id="chkAgree" onclick="SetDis();" /> 동의함
        <input type="submit" id="btnSubmit" value="회원가입페이지로 이동" />
    </form>
   
    <script>
        // 기본값으로 버튼 비활성화
        document.getElementById("btnSubmit").disabled = true; // 비활성화
    </script>

</body>
</html>



==============================================================================================


==> LoginProcess.aspx


<%@ Page Language="C#" %>

<%
    Response.Write(String.Format("아이디 : {0}<br />암호 : {1}<br />"
        , Request["txtUID"], Request["txtPwd"]));
 %>
 <input type="button" value="뒤로" onclick="history.go(-1);" />

Posted by holland14
: