Skip to content

Commit

Permalink
Add a mess
Browse files Browse the repository at this point in the history
  • Loading branch information
DataEraserC committed Oct 30, 2022
1 parent 2938722 commit badc1d2
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 0 deletions.
21 changes: 21 additions & 0 deletions html/12.html
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>
24 changes: 24 additions & 0 deletions html/12.js
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)
}
20 changes: 20 additions & 0 deletions html/13.css
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;
}
24 changes: 24 additions & 0 deletions html/13.html
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>
8 changes: 8 additions & 0 deletions html/13.js
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);
}
9 changes: 9 additions & 0 deletions rust/tests/Cargo.toml
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"
10 changes: 10 additions & 0 deletions rust/tests/src/main.rs
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
}

0 comments on commit badc1d2

Please sign in to comment.