Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cheerioInf committed Nov 23, 2022
2 parents cad215b + 4353b6e commit 550346a
Show file tree
Hide file tree
Showing 21 changed files with 1,077 additions and 10 deletions.
768 changes: 758 additions & 10 deletions class3-Javascript基础/Javascript-1.md

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions class3-Javascript基础/counter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!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">
<link rel="stylesheet" href="./index.css" type="text/css">
<title>JavaScript基础知识</title>
</head>
<body>
<div class="container">
<h2>实时字符计数器</h2>
<textarea name="textarea" id="textarea" cols="30" rows="10" placeholder="输入你的文字" onkeyup="countingCharacter();"></textarea>
<p>您输入的字符总数: <span class="counter">0</span></p>
</div>

<script type="text/javascript">
const textarea = document.querySelector('textarea');
const counter = document.querySelector('.counter');

function countingCharacter() {
const text = textarea.value;
const textLength = textarea.value.length;
counter.innerText = `${textLength}`;
}
</script>
</body>
</html>
<style src></style>
<!-- <script type="text/javascript" src="./first.js"></script> -->

<script type="text/javascript" src="./second.js"></script>
66 changes: 66 additions & 0 deletions class3-Javascript基础/fakejson.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[
{
"id": "020101",
"label": "经济学_普通本科"
},
{
"id": "020102",
"label": "经济统计学_普通本科"
},
{
"id": "020104",
"label": "资源与环境经济学_普通本科"
},
{
"id": "020105",
"label": "商务经济学_普通本科"
},
{
"id": "020106",
"label": "能源经济_普通本科"
},
{
"id": "020109",
"label": "数字经济_普通本科"
},
{
"id": "0201TP",
"label": "经济学类专业_普通本科"
},
{
"id": "020301",
"label": "金融学_普通本科"
},
{
"id": "020302",
"label": "金融工程_普通本科"
},
{
"id": "020303",
"label": "保险学_普通本科"
},
{
"id": "020304",
"label": "投资学_普通本科"
},
{
"id": "020305",
"label": "金融数学_普通本科"
},
{
"id": "020306",
"label": "信用管理_普通本科"
},
{
"id": "020307",
"label": "经济与金融_普通本科"
},
{
"id": "020310",
"label": "金融科技_普通本科"
},
{
"id": "0203TP",
"label": "金融学类专业_普通本科"
}
]
131 changes: 131 additions & 0 deletions class3-Javascript基础/first.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
function fn(){
// 1//.typeof 2//instanceof 3.tostring
var a;
var name= new Object
console.log(name.__proto__);
// console.log (a instanceof String); //type of打印null 对象显示的使object
var b = null;
// var b = {}
console.log ("b="+b); //type of打印null 对象显示的使object
console.log (b instanceof Object); //type of打印null 对象显示的使object
var c = 1;
console.log (typeof(c));
var d = false;
console.log (typeof(d))
//对象
console.log (typeof(fun1()))
var obj ={
key1:'31',
key2:'5'
}
console.log (typeof(obj))
// var obj2 = {
// name: "lpc",
// sex:"man"
// }

// var obj2=new Object();
// obj2.name = "lpc"
// obj2.sex = "man"
// console.log(obj2)
// console.log(obj2.name)
// console.log(obj2.sex)

let obj3 = createobj(1,2);

console.log(obj3.key)
const arr =[0,1,2,3];
arr.forEach((item,index)=>{
console.log(item)
})
console.log(arr);
arr.push("6")
console.log(arr);
arr.pop()
console.log(arr);
arr.push(createobj())
console.log(arr);


console.log(0+"*"+0+"="+ans)
// console ={
// log();
// alert();
// warn()
// }
console.log()

var fruits = new Array(3); //创建一个长度为3的空数组
console.log(fruits);
fruits[0] = "apple";
fruits[1] = "banana";
// fruits[2] = "pear";
console.log(fruits);
}

function createobj(a,b){
console.log(sss)
var tmp = {
key : a,
name: b
}
return tmp;
}
function fun3(){

}
function fun1(){
a = 2
function fun2(){
fun3()
}
fun1();
}


// function fn(){
// t = true
// if(t){
// var name = 'LanMei';
// console.log (name); //LanMei
// }
// console.log (name); //LanMei
// if(t){
// let birth = 1010;
// console.log (); //1010
// }
// // console.log (birth); //errr //undefined
// console.log (name); //LanMei
// }

function sum(){
console.log(a)
}

const v=()=>{
console.log(b*b)
}


function hanshuming(a,b){

}

function OpenDoor(){
console.log("OpenDoor")
}
function opendoor(){
console.log("opendoor")
}
// function varLetConst(){
// var a = 1
// }

// function newNum(){
// console.log("来蓝山找灿狗学前端!");
// }


// function newNum(){
// console.log("来蓝山找灿狗学前端!");
// }
32 changes: 32 additions & 0 deletions class3-Javascript基础/form.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!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">
<link rel="stylesheet" href="./index.css" type="text/css">
<title>JavaScript基础知识</title>
</head>
<body>
<div>
<form action="" method="get">
您最喜欢水果?<br /><br />

<label><input name="Fruit" type="radio" value="1" />苹果 </label>

<label><input name="Fruit" type="radio" value="2" />桃子 </label>

<label><input name="Fruit" type="radio" value="3" />香蕉 </label>

<label><input name="Fruit" type="radio" value="4" />梨 </label>

<label><input name="Fruit" type="radio" value="5" />其它 </label>

</form>
</div>
</body>
</html>
<style src></style>
<!-- <script type="text/javascript" src="./first.js"></script> -->

<script type="text/javascript" src="./second.js"></script>
Binary file added class3-Javascript基础/img/basic/3Q.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added class3-Javascript基础/img/basic/HB.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added class3-Javascript基础/img/basic/banner1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added class3-Javascript基础/img/basic/bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added class3-Javascript基础/img/basic/console1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added class3-Javascript基础/img/basic/console2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added class3-Javascript基础/img/basic/console3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added class3-Javascript基础/img/basic/console4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added class3-Javascript基础/img/basic/console5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added class3-Javascript基础/img/basic/console6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added class3-Javascript基础/img/basic/file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added class3-Javascript基础/img/basic/xns.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added class3-Javascript基础/img/function/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions class3-Javascript基础/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.body{
width:100%;
height:100%;
background-color:#efefef
}
.btn-1{
width:"3rem";
border:none;
margin:25% 45%;
border-radius:8px;
background-color:#f5c8c8
}
39 changes: 39 additions & 0 deletions class3-Javascript基础/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!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">
<link rel="stylesheet" href="./index.css" type="text/css">
<title>JavaScript基础知识</title>
</head>
<body>
<div>
<input class="btn-1" type="button" value="是一个按钮" onclick="fn()">
<!-- <button class="btn-1" value="是一个按钮" onclick="fn()"> -->
<!-- <input value="是一个按钮" onclick="fn()"> -->
</div>

<!-- <div>
<selectbox>
</div>
<div>
<input class="btn-1" type="button" value="是一个按钮" onclick="fn()">
</div> -->
</body>
</html>
<style src></style>
<!--<script>
var num = 10;
function nu(){
var num = 20;
console.log(num);
}
nu();
</script> -->
<script type="text/javascript" src="./first.js">

</script>

<!-- <script type="text/javascript" src="./second.js"></script> -->
7 changes: 7 additions & 0 deletions second.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var num = 10;
function nu(){
var num = 20;
console.log(num);
}
nu();
console.log(num);

0 comments on commit 550346a

Please sign in to comment.