函数内不使用var,该变量是全局的
var a = 20
function test(){
a = 30
}
test()
console.log(a) // 30
在某一设备实现列表滚动时,有时会出现往下滑动,背景色不一样的情况:
解决方法: position:fixed top:xxpx; bottom:0
var a = 20
function test(){
a = 30
}
test()
console.log(a) // 30
解决方法: position:fixed top:xxpx; bottom:0