document.getElementById("on{aid}").style.background-Image=url('你的图片路径')
楼上的少了一杠 就是把ID为"on{aid}“的元素的样式的背景属性设为你的图片
document.getElementById("on{aid}").style.background ="url('你的图片路径')";
有什么问题可以hi我。
去http://tool.chinaz.com/Tools/CssDesigner.aspx这个网站看看吧
document.getElementById("on{aid}").style.backgroundImage=url('你的图片')
有background-image这个属性