1
我想在嵌入式樣式聲明中使用JavaScript變量屏幕作爲樣式backgroundattribute。如何在嵌入式樣式中獲取javascript變量
<div id ="content" style=" position: relative; top: -400px; left: 0px; width: 60px; height: 400px; z-index: 901;background-image: url(' + screen + ') "></div>
閱讀本 - http://stackoverflow.com/questions/710275/how-to-add-update-an-attribute-to-an-html-元素使用javascript – blackhawk 2013-03-09 19:11:12