Blogger Information
Blog 7
fans 0
comment 1
visits 3616
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
10-22作业
天长地久的博客
Original
553 people have browsed it
<script>

var score=90;

if(score<60){

alert('不及格');

}

if(score>60&&score<80){

alert('一般');

}

if(score>80&&score<95){

alert('良好');


}

if(score=100){

alert('优秀');

}

//推荐这一种

</script>




<script>

var arr=[1,2,3,4,5,6,7];

console.log(arr);

arr.push(55);//追加数组

console.log(arr);

arr.pop();//移除最后一个数组

console.log(arr);

arr.shift();//

console.log(arr);

arr.unshift(1);//

console.log(arr);

arr.splice(2,3,4,6);//

console.log(arr);


var res=arr.indexOf(1,0);//从0开始查找1这个数字

alert(res);//返回那个数字的下标,如果返回值是-1,就说明数组里没有这个数字。

console.log(arr);


for(i=0;i<arr.length;i++){

console.log(arr[i]);

}


// window.location.href='https://www.baidu.com';

window.open('https://www.baidu.com');//默认为被阻止

</script>




<body>

<div style="background:red;width:100px;height:50px;" onmouseover="over()"; onmouseleave="leave()";>1</div>

<script>

function over(){

console.log('鼠标划过了');

}

function leave(){

console.log('鼠标离开了');

}

</script>

</body>





Correction status:qualified

Teacher's comments:下次把代码放在代码框中提交, 还要写作业总结, 看一下群公告中的作业要求
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post