자바 스크립트 이벤트 핸들러에 대해서 질문 합니다.
혼자 공부 하다가 막히는 부분이 있는대요.
제대로 코딩을 했다면, "register now" 텍스트를 클릭 하면 "register now" 텍스트가 사라지고 바로 밑에 로그인 폼이
Username:
[텍스트 박스]
Password:
[텍스트 박스]
Verify Password:
[텍스트 박스]
save cancel
이렇게 로그인 폼이 생겨야 합니다. 아무리 머리를 쥐어짜도 어떻게 해야 하는지 감이 안오네요 ㅠㅠ
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="SuperSite.Login" %>
<!DOCTYPE html>
<head runat="server">
<title>SuperSite</title>
<link href="Styles/Login.css" rel="Stylesheet" />
<style type="text/css">
.auto-style1 {
width: 100%;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div class="auto-style1">
<strong>SuperSite</strong></div>
<br />
<br />
<div>Already a registered SuperSite user? Sign in with one of the following services</div>
<br />
<a href="
http://facebook.com"><asp:Image ID="Image5" runat="server" Height="114px" ImageUrl="~/Images/FacebookGray.png" Width="141px" /></a>
<a href="
http://google.com"><asp:Image ID="Image2" runat="server" Height="114px" ImageUrl="~/Images/GoogleGray.png" Width="141px" /></a>
<a href="
http://login.live.com"><asp:Image ID="Image3" runat="server" Height="114px" ImageUrl="~/Images/WinLiveGray.png" Width="141px" /></a>
<a href="
http://yahoo.com"><asp:Image ID="Image4" runat="server" Height="114px" ImageUrl="~/Images/YahooGray.png" Width="141px" /></a>
<br />
<br />
<br />
<p><strong>sign in with your SuperSite username and password</strong></p>
<p><strong>add another authentication service from the list above</strong></p>
<p><strong>change your SuperSite password</strong></p>
<br />
<p>If you haven't already registered with SuperSite</p>
<button onclick="myFunction()">register now</button>
<br />
<br />
<p id="myRegister">
Username: <br />
<asp:TextBox ID="Username" runat="server" /> <br />
Password: <br />
<asp:TextBox ID="Password" runat="server" /> <br />
Verify Password: <br />
<asp:TextBox ID="VerifyPassword" runat="server"></asp:TextBox> <br />
Fisnish your registration by signing in <br />
with one of the services above or save <br />
your registration directly.
</p>
<p id="demo">
<script>
function myFunction() {
var x = document.getElementById("myRegister").innerHTML;
document.getElementById("demo").innerHTML = x;
}
</script>
<br />
</form>
</body>
</html>