minsung

focus on, onblur

var Email={
checkEmail:function(self){
checkEmail:function(id){
var email=document.getElementById('eValidation').value;
var regExp = /^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*.[a-zA-Z]{2,3}$/i;
if(regExp.test(email)){
......@@ -38,13 +39,29 @@ function checkValidation(self){
}
function ajaxvalidation(self){
$(document).ready(function(){
var email=document.querySelector('#evalidation');
var fpassword=document.querySelector('#evalidation');
function focusFunction(id) {
document.getElementById(id).focus();
}
})
function blurFunction(id) {
document.getElementById(id).style.borderColor="2px solid";
document.getElementById(id).style.borderColor="red";
}
function validate(self){
var email=document.getElementById('eValidation').value;
var regExp = /^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*.[a-zA-Z]{2,3}$/i;
var fpassword=document.getElementById('fValidation').value;
var spassword= document.getElementById('sValidation').value;
var x = document.getElementById(".inputset");
$(document).ready(function(){
if(regExp.test(email)){
return true;
}else if(email=""){
return false;
}else return true;
});
}
*/
......
......@@ -27,20 +27,20 @@
<div id="inputset">
<form class="signinform" action="loginmain.html" onsubmit="return checkValidation()" method="post">
<label for="email">이메일:</label><br>
<input id="eValidation"type="text" name="email" placeholder="이메일을 입력하세요." ><br>
<input class="inputset" id="eValidation"type="text" name="email" onblur="validateinput()" placeholder="이메일을 입력하세요." ><br>
<label for="password">비밀번호:</label><br>
<input id="fValidation" type="password" name="password" placeholder="비밀번호를 입력하세요." ><br>
<input class="inputset" id="fValidation" type="password" name="password" onblur="" placeholder="비밀번호를 입력하세요." ><br>
<label for="password">비밀번호 확인:</label><br>
<input id="sValidation" type="password" name="checkpassword" placeholder="비밀번호를 입력하세요." ><br>
<input class="inputset" id="sValidation" type="password" name="checkpassword" onblur="" placeholder="비밀번호를 입력하세요." ><br>
<label for="name">이름:</label><br>
<input type="text" name="name"placeholder="이름을 입력하세요." ><br>
<input class="inputset"type="text" name="name" onblur="" placeholder="이름을 입력하세요." ><br>
<label for="age">나이:</label><br>
<input type="text" name="age" placeholder="나이를 입력하세요." ><br><br>
<input class="inputset"type="text" name="age" onblur="" placeholder="나이를 입력하세요." ><br><br>
<label for="sex">성별:</label><br>
<input type="radio" value="man" name="sex">남자<br>
......