-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2938722
commit badc1d2
Showing
7 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Document</title> | ||
</head> | ||
|
||
<body> | ||
<form name="fo" action="10.html" onsubmit="return a()"> | ||
<input name="txt" type="password" id="in"> | ||
<input type="submit"> | ||
<button type="reset">reset</button> | ||
</form> | ||
<button onclick="c()">123</button> | ||
</body> | ||
|
||
</html> | ||
<script src="12.js"> </script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
function a() { | ||
x = document.forms["fo"]["txt"].value | ||
if (x == null || x == "") { | ||
alert("input can't be blank") | ||
return false | ||
} | ||
else if (x == "123456") { | ||
alert("login success!") | ||
} | ||
else { | ||
alert("password is wrong") | ||
return false | ||
} | ||
} | ||
function b() { | ||
windows.location = "11.html" | ||
} | ||
|
||
function c() | ||
{ | ||
setTimeout(function(){ | ||
document.write("1234565432") | ||
},3000) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.a { | ||
background-color: aliceblue; | ||
height: 500px; | ||
width: 1500px; | ||
margin-left: 5%; | ||
overflow: hidden; | ||
position: absolute; | ||
} | ||
.b { | ||
width: 4500px; | ||
height: 500px; | ||
display: flex; | ||
/* left: -100px; */ | ||
position: relative; | ||
} | ||
.c { | ||
width: 1500px; | ||
height: 500px; | ||
float:left; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Document</title> | ||
<link rel="stylesheet" href="13.css"> | ||
|
||
</head> | ||
|
||
<body> | ||
<div class="a"> | ||
<div class="b" style="left:-100px"> | ||
<div class="c" style="background-color: yellow;"></div> | ||
<div class="c" style="background-color: orange;"></div> | ||
<div class="c" style="background-color: greenyellow;"></div> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
</html> | ||
<script src="13.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
onload = function () { | ||
setInterval(function () { | ||
var x = document.getElementsByClassName("b")[0]; | ||
console.log(x.style.left); // can be modified | ||
console.log(x.offsetLeft); // read only | ||
x.style.left = (x.offsetLeft - 1) + "px" | ||
}, 10); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[package] | ||
name = "tests" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
num = "0.4.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
fn main() { | ||
let s1 = String::from("Hello world"); | ||
|
||
let s2 = takes_ownership(s1); | ||
println!("{}", s1); | ||
println!("{}", s2); | ||
} | ||
fn takes_ownership(s: String) -> String { | ||
s | ||
} |