JS填空问题(100)

JavaScript022

JS填空问题(100),第1张

document.form1.a.value

其中a为file input,form1为a所在的表单

获取文件域用.value ~~

a.substr(a.length-3,3)这样吧

let A = [6,9,10,11,13,15]

let B = [2,3,4,5,6,9,10]

let C = [2,3,4,7,9,10]

let D = []

let k = 0

let interval = setInterval(function () {

let num = A[k]

if(B[0]<= A[k]){

if(C[0]<=B[0]){

num = C[0]

C.splice(0,1)

}else{

num = B[0]

B.splice(0,1)

}

}else{

if(C[0]<=A[k]){

num=C[0]

C.splice(0,1)

}else{

num = A[k]

k++

}

}

if(k == A.length + 1){

clearInterval(interval)

console.log('D:' + D)

return

}

D.push(num)

},10)