Home > front end >  The relations between HTML, CSS, JavaScript
The relations between HTML, CSS, JavaScript

Time:10-14

HTML, CSS, JavaScript, relationship of

 

Web is mainly composed of three parts: the Structure (Structure), performance (Presentation) and Behavior (behaviors)
HTML - structure, determine the web structure and content (" what ")
CSS - (style), set the performance of the web page style (" what ")
JavaScript (JS) -- behavior, control the behavior of the web page (" what ")




Change password: HTML
A href="javascript: void (0)" :
can't click into the
 & lt; Form> 

Email address & lt;/label>

Verification code & lt;/label>






CSS
 
Body {
# verify {
position: absolute;//looking for div control position
Top: 6 px;
Right: 10 px;
color: #fff;
text-decoration: none;//control line
}
}



JS

 
<script>
$(function () {
Var getCode=false;
$(" # verify "). Click (function () {
Var time=60;
Var $code=$(this);
Var Email=$(" # Email "). Val ();
if (! New RegExp (" ^ [a zA - Z0 - _ - 9] + @ [a zA - Z0 - _ - 9] + (\. [a zA - Z0 - _ - 9] +) + $"). The test (Email)) {
Alert (' email format error! '); return;
}
Var url="/onepiece/verify";
$.post (url, Email: Email, attach the function (d) {
If (, dc ode=="1") {
Var t=setInterval (function () {
GetCode=true;
If (time==0) {
ClearInterval (t);
$code. HTML (" get back ");
GetCode=false;
return;
}
$code. HTML (time + "seconds");
Time -;
}, 1000);
}
The else {
Alert (d.m sg);
return;
}
}, "json");
});
</script>



CodePudding user response: