<h2>操作成功</h2>
<br><br>
<div><span id="txt">5</span>秒返回到主頁(yè)
<a href="http://www.baidu.com">返回</a></div>
<script type="text/javascript">
var num=6;
function numCount(){
num=num-1;
document.getElementById('txt').innerHTML=num;
看看我的吧
<br><br>
<div><span id="txt">5</span>秒返回到主頁(yè)
<a href="http://www.baidu.com">返回</a></div>
<script type="text/javascript">
var num=6;
function numCount(){
num=num-1;
document.getElementById('txt').innerHTML=num;
看看我的吧
2022-02-21
//創(chuàng)建數(shù)組
var arr=new Array();
arr=['*','##',"***","&&","****","##*"];
arr[7]="**";
//顯示數(shù)組長(zhǎng)度
alert("數(shù)組的長(zhǎng)度是 :"+arr.length);
//將數(shù)組內(nèi)容輸出,完成達(dá)到的效果。
document.write(arr[0]+"<br>");
document.write(arr[7]+"<br>");
document.write(arr[2]+"<br>");
document.write(arr[4]+"<br>");
var arr=new Array();
arr=['*','##',"***","&&","****","##*"];
arr[7]="**";
//顯示數(shù)組長(zhǎng)度
alert("數(shù)組的長(zhǎng)度是 :"+arr.length);
//將數(shù)組內(nèi)容輸出,完成達(dá)到的效果。
document.write(arr[0]+"<br>");
document.write(arr[7]+"<br>");
document.write(arr[2]+"<br>");
document.write(arr[4]+"<br>");
2022-01-27
我覺(jué)的可以這么寫(xiě)
var a = document.getElementById('txt1').value;
var b = document.getElementById('txt2').value;
var f = document.getElementById('select').value;
document.getElementById('fruit').value = eval(a + f + b);
var a = document.getElementById('txt1').value;
var b = document.getElementById('txt2').value;
var f = document.getElementById('select').value;
document.getElementById('fruit').value = eval(a + f + b);
2022-01-21
//定義函數(shù)
function requare(a,b){
c=a-b;
switch(c){
case c>0:
return a;
case c<0:
return b;
default:
return a;
}
}
function requare(a,b){
c=a-b;
switch(c){
case c>0:
return a;
case c<0:
return b;
default:
return a;
}
}
2021-10-29
大一女生篩選:var arr = new Array(4);
for(var i = 0;i < arr.length; i++){
arr[i] = new Array(10); }
document.write("大一的有:"+"<br>")
for(i=0;i<infos.length;i++){
if(infos[i][3]=="大一"){
arr[i]=infos[i];
document.write(arr[i]+"<br>");
}
for(var i = 0;i < arr.length; i++){
arr[i] = new Array(10); }
document.write("大一的有:"+"<br>")
for(i=0;i<infos.length;i++){
if(infos[i][3]=="大一"){
arr[i]=infos[i];
document.write(arr[i]+"<br>");
}
2021-10-29
Nili
var infos = [['小A','女',21,'大一'],['小B','男',23,'大三'],['小C','男',24,'大四'],['小D','女',21,'大一'],['小pppp','男',21,'大一'],['小9999','女',21,'大一'],['ioooo','女',21,'大一']]
for(let i=0;i<infos.length;i++){
if(infos[i].includes('大一')&&infos[i].includes('女')){
console.log(infos[i][0])
}
}
var infos = [['小A','女',21,'大一'],['小B','男',23,'大三'],['小C','男',24,'大四'],['小D','女',21,'大一'],['小pppp','男',21,'大一'],['小9999','女',21,'大一'],['ioooo','女',21,'大一']]
for(let i=0;i<infos.length;i++){
if(infos[i].includes('大一')&&infos[i].includes('女')){
console.log(infos[i][0])
}
}
2021-09-02
var infos = [['小A','女',21,'大一'],['小B','男',23,'大三'],['小C','男',24,'大四'],['小D','女',21,'大一'],['小pppp','男',21,'大一'],['小9999','女',21,'大一'],['ioooo','女',21,'大一']]
for(let i=0;i<infos.length;i++){
if(infos[i].includes('大一')&&infos[i].includes('女')){
console.log(infos[i][0])
}
}
for(let i=0;i<infos.length;i++){
if(infos[i].includes('大一')&&infos[i].includes('女')){
console.log(infos[i][0])
}
}
2021-08-25
let infos = [['小A','女',21,'大一'],['小B','男',23,'大三'],['小C','男',24,'大四'],['小D','女',21,'大一']]
for(let i=0;i<infos.length;i++){
if(infos[i].includes('大一')){
console.log(infos[i][0],infos[i])
}
}
for(let i=0;i<infos.length;i++){
if(infos[i].includes('大一')){
console.log(infos[i][0],infos[i])
}
}
2021-08-25
<script>
var arr=new Array();
arr=['*','##','***','&&','****','##']
arr[7]='**';
alert('chang:'+arr.length);
document.write(arr[0]+'<br/>'+arr[7]+'<br>'+arr[2]+'<br>'+arr[4]);
</script>
var arr=new Array();
arr=['*','##','***','&&','****','##']
arr[7]='**';
alert('chang:'+arr.length);
document.write(arr[0]+'<br/>'+arr[7]+'<br>'+arr[2]+'<br>'+arr[4]);
</script>
2021-08-10