js中實現對動態內容的css樣式修飾

下面的代碼能夠實現將css樣式修飾的內容動態顯示,javascript 先獲取變量,而後css 一:用createElement()函數建立相應的元素標籤,java 如建立一個div:var div1=document.createElement("div");//建立divnode 二:設置其css樣式:數據庫  div1.setAttribute("class","blogs"); setAt
相關文章
相關標籤/搜索