Commit 1f2c9964 by Thi Thanh Yen Hoang

update second commit

parent 2f5862af
...@@ -6,24 +6,44 @@ ...@@ -6,24 +6,44 @@
</head> </head>
<body> <body>
<table>
<tr><td>
<form>
<table>
<p> Register Form </p>
<tr>
<td></td>
<td><div id="message"> </div></td>
</tr>
<tr>
<td class=label>First Name</td>
<td><input type="text" id="fname" placeholder="First Name" value="" size=80% /> </td>
</tr>
<tr>
<td class=label>Last Name </td>
<td><input type="text" placeholder="Last Name" id="lname" value="" size=80% /> </td>
</tr>
<tr>
<td class=label>Email </td>
<td><input type="text" placeholder="Email" id="email" value="" size=80% /> </td>
</tr>
<tr>
<td class=label>Email Confirmation </td>
<td><input type="text" placeholder="Email Confirmation" id="cemail" value="" size=80% /> </td>
</tr>
<tr>
<td class=label>Birthday </td>
<td> <input type="text" placeholder="Birthday" id="bday" value="" size=80% /></td>
</tr>
<tr>
<td class=label> </td>
<td><button onclick="return validate();">Register</button> </td>
</tr>
</table>
</form>
</td><tr></table>
<form> <script src="javascript.js"></script>
<div><p> Register Form </p></div>
<ul>
<li><div id="message"> </div></li>
<li><div class=label>First Name</div> <input type="text" id="fname" placeholder="First Name" value="" size=100% /></li>
<li><div class=label>Last Name </div><input type="text" placeholder="Last Name" id="lname" value="" size=100% /></li>
<li><div class=label>Email</div> <input type="text" placeholder="Email" id="email" value="" size=100% /></li>
<li><div class=label>Email Confirmation</div> <input type="text" placeholder="Email Confirmation" id="cemail" value="" size=100% /></li>
<li><div class=label> Birthday </div> <input type="text" placeholder="Birthday" id="bday" value="" size=100% /></li>
</ul>
<button onclick="return validate();">Register</button>
</form>
<script src="javascript.js">
</script>
</body> </body>
</html> </html>
...@@ -22,8 +22,8 @@ function validate() ...@@ -22,8 +22,8 @@ function validate()
} }
else{ else{
if(filter.test(email) == filter.test(cemail)) { if(email == cemail) {
if (alphabeta.test(firstname) == true && alphabeta.test(lastname) == true && date.test(bday) == true) { if (alphabeta.test(firstname) == true && alphabeta.test(lastname) == true && date.test(bday) == true && filter.test(email) == true && filter.test(cemail) == true) {
alert("Thank for your registering"); alert("Thank for your registering");
return true; return true;
} }
......
form { form {
margin: auto; margin: auto;
width: 70%; border: none;
height: 40%;
border: 1px ridge gray;
} }
input { input {
border-radius: 5px;
float: right; float: right;
margin-top: 5px; margin-top: 5px;
margin-right:10px; margin-right:10px;
margin-bottom:5px; margin-bottom:5px;
position: relative; margin-left: 25px;
padding-left: 5px;
padding-right: 5px;
padding-bottom: 5px;
padding-top: 5px;
} }
button { button {
margin-top: 5px; margin-top: 5px;
margin-right:10px; margin-right:10px;
margin-bottom:5px; margin-bottom:5px;
margin-left:300px; margin-left: 25px;
background-color: white;
border-radius: 5px;
} }
div p{ p{
border: none; border: none;
text-align: center; text-align: center;
font-size: 24px; font-size: 24px;
} }
ul{ td.label {
list-style-type: none;
margin-top: 5px;
margin-right:10px;
margin-bottom:5px;
}
div.label {
width:15%;
float:left;
text-align: right; text-align: right;
margin-top: 10px; margin-top: 10px;
margin-right:5px; margin-right:5px;
margin-bottom:10px; margin-bottom:10px;
position: relative;
font-weight: bold; font-weight: bold;
} }
table {
border: 1px ridge gray;
margin-left: 20%;
margin-right: 20%;
}
table table {
border: none;
margin-left: 0;
margin-right: 0;
}
#message{
float: right;
width: 95%;
margin-right:15px;
color: #000000;
background-color: #F08080;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment