Commit 1f2c9964 by Thi Thanh Yen Hoang

update second commit

parent 2f5862af
......@@ -6,24 +6,44 @@
</head>
<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>
<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>
<script src="javascript.js"></script>
</body>
</html>
......@@ -22,8 +22,8 @@ function validate()
}
else{
if(filter.test(email) == filter.test(cemail)) {
if (alphabeta.test(firstname) == true && alphabeta.test(lastname) == true && date.test(bday) == true) {
if(email == cemail) {
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");
return true;
}
......
form {
margin: auto;
width: 70%;
height: 40%;
border: 1px ridge gray;
border: none;
}
input {
border-radius: 5px;
float: right;
margin-top: 5px;
margin-right:10px;
margin-bottom:5px;
position: relative;
margin-right:10px;
margin-bottom:5px;
margin-left: 25px;
padding-left: 5px;
padding-right: 5px;
padding-bottom: 5px;
padding-top: 5px;
}
button {
margin-top: 5px;
margin-right:10px;
margin-bottom:5px;
margin-left:300px;
margin-right:10px;
margin-bottom:5px;
margin-left: 25px;
background-color: white;
border-radius: 5px;
}
div p{
p{
border: none;
text-align: center;
font-size: 24px;
}
ul{
list-style-type: none;
margin-top: 5px;
margin-right:10px;
margin-bottom:5px;
}
div.label {
width:15%;
float:left;
td.label {
text-align: right;
margin-top: 10px;
margin-right:5px;
margin-bottom:10px;
position: relative;
font-weight: bold;
margin-right:5px;
margin-bottom:10px;
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