代码写错了。
$("#box").css("height","300px"})这里 “300px”后面多了个 }
应该是
$("#box").css("height","300px")var input=$("input")input.each(function(ele){
$(ele).css("background","red")
})
input[i]是HTMLElement对象不是jquery对象,没有css方法
代码写错了。
$("#box").css("height","300px"})这里 “300px”后面多了个 }
应该是
$("#box").css("height","300px")var input=$("input")input.each(function(ele){
$(ele).css("background","red")
})
input[i]是HTMLElement对象不是jquery对象,没有css方法