Read the terms at registration
<! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN">
<Html>
<Head>
<Title> demo2.html </title>
<Meta http-equiv = "keywords" content = "keyword1, keyword2, keyword3">
<Meta http-equiv = "description" content = "this is my page">
<Meta http-equiv = "content-type" content = "text/html; charset = UTF-8">
<! -- <Link rel = "stylesheet" type = "text/css" href = "./styles.css"> -->
<Script type = "text/javascript" src = ".../js/jquery-1.9.1.js"> </script>
<Script type = "text/javascript">
$ (Document). ready (function (){
Var $ submitBtn = $ ("# submitBtn"); // obtain the Button Object
// Register a click event for the button
$ SubmitBtn. click (function (){
// Alert ("I Have Been clicked! ");
});
// Second, bind the event. The first parameter is the event binding type, and the second parameter is the triggered function.
$ (SubmitBtn). bind ("click", function (){
Var $ check = $ ("# agree"); // gets the Element Object of the checkbook.
// Convert jQuery into a Dom object
/* Var checkDom = $ check [0];
If (checkDom. checked ){
Alert ("Agree to register! ");
} Else {
Alert ("Please select to agree to the terms! ");
}*/
If ($ check. is (": checked ")){
Alert ("Agree to register! ");
} Else {
Alert ("Please select to agree to the terms! ");
}
});
});
</Script>
</Head>
<Body>
Terms of registration: <input type = "checkbox" id = "agree"/> I have carefully read and accept the csdn terms of registration.
<Input type = "submit" value = "register" id = "submitBtn"/>
</Body>
</Html>
Move left and right ------------------------------------------------------------
<! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN">
<Html>
<Head>
<Title> demo03.html </title>
<Meta http-equiv = "keywords" content = "keyword1, keyword2, keyword3">
<Meta http-equiv = "description" content = "this is my page">
<Meta http-equiv = "content-type" content = "text/html; charset = UTF-8">
<! -- <Link rel = "stylesheet" type = "text/css" href = "./styles.css"> -->
<Script type = "text/javascript" src = ".../js/jquery-1.9.1.js"> </script>
<Script type = "text/javascript">
$ (Document). ready (function (){
Var $ romve = $ ("# romve ");
Var $ romves = $ ("# romves ");
$ Romve. click (function (){
Var $ opts = $ ("# ropt> option: selected ");
$ Opts. appendTo ("# lopt ");
});
$ Romves. bind ("click", function (){
Var $ opts = $ ("# ropt> option ");
Alert ($ opts. length );
$ Opts. appendTo ("# lopt ");
});
// Double-click
$ ("# Ropt"). bind ("dblclick", function (){
Var $ pots = $ ("# ropt> option: checked ");
$ Pots. appendTo ("# lopt ");
});
});
$ (Document). ready (function (){
Var $ lromve = $ ("# lromve ");
Var $ lromves = $ ("# lromves ");
// Register the click Event
$ Lromve. click (function (){
Var $ opts = $ ("# lopt> option: selected ");
$ Opts. appendTo ("# ropt ");
});
// Bind events
$ Lromves. bind ("click", function (){
Var $ opts = $ ("# lopt> option"); // obtain all options
// Alert ($ opts. length );
$ Opts. appendTo ("# ropt ");
// $ ("# Ropt"). append ($ opts );
});
// Double-click
$ ("# Lopt"). bind ("dblclick", function (){
Var $ opts = $ ("# lopt> option: checked"); // obtain all options
$ Opts. appendTo ("# ropt ");
});
});
</Script>
</Head>
<Body>
<H1 align = "center"> left and right drift <Div style = "position: absolute; left: pixel PX; top: 120px">
<Div style = "float: left; width: 200px; height: 300px; background-color: lightsteelblue; text-align: center;"> <br>
<Select id = "lopt" multiple = "multiple" size = "9" style = "width: 80px;">
<Option> aa </option>
<Option> bb </option>
<Option> cc </option>
<Option> dd </option>
<Option> ee </option>
<Option> ff </option>
<Option> gg </option>
<Option> hh </option>
<Option> pp </option>
</Select>
<Br/>
<Input type = "button" id = "lromve" value = "right shift selected" style = "width: 80px;"/> <br/>
<Input type = "button" id = "lromves" value = "all right shift" style = "width: 80px;"/>
</Div>
<Div style = "width: 200px; height: 300px; background-color: # bbffaa; text-align: center;"> <br>
<Select id = "ropt" multiple = "multiple" size = "9" style = "width: 80px;">
<Option> option 1 </option>
<Option> option 2 </option>
<Option> option 3 </option>
<Option> option 4 </option>
<Option> option 5 </option>
<Option> option 6 </option>
<Option> option 7 </option>
<Option> option 8 </option>
<Option> option 9 </option>
</Select>
<Br/>
<Input type = "button" id = "romve" value = "Move left selected" style = "width: 80px;"/> <br/>
<Input type = "button" id = "romves" value = "Move left all" style = "width: 80px;"/>
</Div>
</Div>
</Body>
</Html>