/ 12评论 / 1070阅读 / 2点赞



这里我们都以开头的div为例子(<div id="cooldiv" class="cdiv"><div>)


function temp_byId(){
    var mydiv = document.getElementById("cooldiv");
    mydiv.setAttribute("height", "20px");

function temp_byClassName(){
    var mydivList = document.getElementsByClassName("cdiv");
    for(var i = mydivList.length; i--;){
        mydivList[i].setAttribute("height", "20px");
function temp(){
    var mydiv = document.getElementById("cooldiv");

    mydiv.style.height = "20px";
    mydiv.style.color = "#66ccff";


function temp(){
    var mydiv = document.getElementById("cooldiv");
    mydiv.style.cssText = " color:#66ccff; height:20px; ";
    /*累加cssText,如果直接等于,则上一句设置的color height会被删掉*/
    mydiv.style.cssText += "; width:20px; ";
var mystyle = document.createElement('style');

mystyle.innerHTML =
'.cdiv {' +
'   color: blue;' +
'   background-color: #66ccff;' +
'   height: 20px;' +

// 获取第一个<script>标签
var ref = document.querySelector('script');
// 在第一个<script>标签前插入<style>标签
ref.parentNode.insertBefore(mystyle, ref);
.newDiv {
    height: 20px;

function temp(){
    var mydiv = document.getElementById("cooldiv");

  1. Rastrear Celular说道:

    Você também pode personalizar o monitoramento de determinados aplicativos, e ele começará imediatamente a capturar instantâneos da tela do telefone periodicamente.

  2. mkeYyGP说道:

    046 CV event finasteride 5mg no prescription cheap 10 LCD screen with 40 pre loaded gauge designs and themes

  3. Assumpmok说道:

    precio levitra 10 Colonies were then transferred to a conical tube and shaken on ice for an additional 30 min until Matrigel was completely dissolved, collected by centrifugation at 115 g for 2 min and pipetted onto a slide


    7 mL kg per percentage than predicted by the Parkland formula for adequate resuscitation coupons for cialis 20 mg

  5. grenuenah说道:

    Reduced live birth rate Reduced fertilization rate Fewer eggs Higher rates of miscarriage buy cialis 20mg Therefore, it is mandatory that different treatment approaches be offered to women for whom hormone therapy is contraindicated


    The faint voice fell, and the people around were shocked again fertility drugs clomid Oh I hope that Simonetta will never wake up I came to see your wife


    EP 1 mRNA is expressed moderately in the muscularis mucosae layer of the stomach when was viagra released

  8. Mark说道:

    Thanks for your blog, nice to read. Do not stop.


您的电子邮箱地址不会被公开。 必填项已用 * 标注