There is a problem with changing the background in js. I use aa.style.background="url(2.jpg)"; there is always something wrong. Please give me some advice. The code is as follows
<!DOCTYPE html><html><head><script> function fun(){ // var Arr=new Array( "1.jpg ", "2.jpg ") // var i=0 ; var aa=document.getElementById("aa"); aa.style.background="url(2.jpg)"; alert("sdfsdfsdf"); }</script> </head><body><table width=500 height=100 id= "aa " background="1.jpg" > <tr> <td> aaaa </td> </tr> </table> <input type="submit" value="Button" id="bb" onClick="fun();"/></body></html>