File tree Expand file tree Collapse file tree 7 files changed +116
-0
lines changed
Expand file tree Collapse file tree 7 files changed +116
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+
4+ < head >
5+ < meta charset ="UTF-8 ">
6+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
7+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
8+ < title > Document</ title >
9+ </ head >
10+
11+ < body >
12+ < form name ="fo " action ="10.html " onsubmit ="return a() ">
13+ < input name ="txt " type ="password " id ="in ">
14+ < input type ="submit ">
15+ < button type ="reset "> reset</ button >
16+ </ form >
17+ < button onclick ="c() "> 123</ button >
18+ </ body >
19+
20+ </ html >
21+ < script src ="12.js "> </ script >
Original file line number Diff line number Diff line change 1+ function a ( ) {
2+ x = document . forms [ "fo" ] [ "txt" ] . value
3+ if ( x == null || x == "" ) {
4+ alert ( "input can't be blank" )
5+ return false
6+ }
7+ else if ( x == "123456" ) {
8+ alert ( "login success!" )
9+ }
10+ else {
11+ alert ( "password is wrong" )
12+ return false
13+ }
14+ }
15+ function b ( ) {
16+ windows . location = "11.html"
17+ }
18+
19+ function c ( )
20+ {
21+ setTimeout ( function ( ) {
22+ document . write ( "1234565432" )
23+ } , 3000 )
24+ }
Original file line number Diff line number Diff line change 1+ .a {
2+ background-color : aliceblue;
3+ height : 500px ;
4+ width : 1500px ;
5+ margin-left : 5% ;
6+ overflow : hidden;
7+ position : absolute;
8+ }
9+ .b {
10+ width : 4500px ;
11+ height : 500px ;
12+ display : flex;
13+ /* left: -100px; */
14+ position : relative;
15+ }
16+ .c {
17+ width : 1500px ;
18+ height : 500px ;
19+ float : left;
20+ }
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+
4+ < head >
5+ < meta charset ="UTF-8 ">
6+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
7+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
8+ < title > Document</ title >
9+ < link rel ="stylesheet " href ="13.css ">
10+
11+ </ head >
12+
13+ < body >
14+ < div class ="a ">
15+ < div class ="b " style ="left:-100px ">
16+ < div class ="c " style ="background-color: yellow; "> </ div >
17+ < div class ="c " style ="background-color: orange; "> </ div >
18+ < div class ="c " style ="background-color: greenyellow; "> </ div >
19+ </ div >
20+ </ div >
21+ </ body >
22+
23+ </ html >
24+ < script src ="13.js "> </ script >
Original file line number Diff line number Diff line change 1+ onload = function ( ) {
2+ setInterval ( function ( ) {
3+ var x = document . getElementsByClassName ( "b" ) [ 0 ] ;
4+ console . log ( x . style . left ) ; // can be modified
5+ console . log ( x . offsetLeft ) ; // read only
6+ x . style . left = ( x . offsetLeft - 1 ) + "px"
7+ } , 10 ) ;
8+ }
Original file line number Diff line number Diff line change 1+ [package ]
2+ name = " tests"
3+ version = " 0.1.0"
4+ edition = " 2021"
5+
6+ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7+
8+ [dependencies ]
9+ num = " 0.4.0"
Original file line number Diff line number Diff line change 1+ fn main ( ) {
2+ let s1 = String :: from ( "Hello world" ) ;
3+
4+ let s2 = takes_ownership ( s1) ;
5+ println ! ( "{}" , s1) ;
6+ println ! ( "{}" , s2) ;
7+ }
8+ fn takes_ownership ( s : String ) -> String {
9+ s
10+ }
You can’t perform that action at this time.
0 commit comments