sdy
var Email={
checkEmail:function(self){
var email=document.getElementById('eValidation').value;
......@@ -5,6 +6,7 @@ var Email={
if(regExp.test(email)){
return true;
}else if(email===""){
focusFunction("#eValidation");
alert("이메일을 입력해주세요!");
return false;
}
......@@ -37,3 +39,29 @@ function checkValidation(self){
}else return false;
}
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;
});
}
......
<!DOCTYPE html>
<html>
<script src="../fetch-master/fetch.js"></script>
<body>
<input type="button" value="fetch" onclick="
fetch('css').then(function(response){
response.text().then(function(text){
alert(text);
})
});
">
</body>
</html>
<!doctype html>
<html>
<head>
<title>WEB1 - Welcome</title>
<meta charset="utf-8">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="colors.js"></script>
<script src="../fetch-master/fetch.js"></script>
</head>
<body>
<h1><a href="#!welcome">WEB</a></h1>
<h1><a href="index.html">WEB</a></h1>
<h2><a href="welcome.html">Welcome</h2>
<input id="night_day" type="button" value="night" onclick="
nightDayHandler(this);
">
<ol id="nav">
</ol>
<article>
</article>
<script>
function fetchPage(name){
fetch(name).then(function(response){
response.text().then(function(text){
document.querySelector('article').innerHTML=text;
})
});
}
if(location.hash){
fetchPage(location.hash.substr(2));
}else{
fetchPage('welcome');
}
fetch('list').then(function(response){
response.text().then(function(text){
document.querySelector('#nav').innerHTML=text;
})
});
</script>
</body>
</html>
File mode changed
No preview for this file type
......@@ -21,6 +21,9 @@
<li><a href="afterlogin.html" class="saw">로그인이후</a></li>
</ol>
</div>
<article>
</article>
<div id="article">
<h2><a href=https://www.helpshift.com/glossary/chat-service/
title="what is chat service">chat service란 무엇인가?</a></h2>
......
......@@ -5,7 +5,11 @@
<meta charset="utf-8">
<link rel="stylesheet" href="style/style.css">
<script src="JS/validation.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.js">
</script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js">
</script>
</head>
<body>
......@@ -26,20 +30,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" 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" 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" placeholder="비밀번호를 입력하세요." ><br>
<label for="name">이름:</label><br>
<input type="text" name="name"placeholder="이름을 입력하세요." ><br>
<input class="inputset"type="text" name="name" placeholder="이름을 입력하세요." ><br>
<label for="age">나이:</label><br>
<input type="text" name="age" placeholder="나이를 입력하세요." ><br><br>
<input class="inputset"type="text" name="age" placeholder="나이를 입력하세요." ><br><br>
<label for="sex">성별:</label><br>
<input type="radio" value="man" name="sex">남자<br>
......