打开chinaren,右键查看源代码,自己分析.

解决方案 »

  1.   

    具体功能,请楼主自行调试,
    <script language="javascript" type="text/javascript">

    var s = 0;
    var ts = null; function gogo()
    {
    ts = window.setInterval("showIt()", 300);
    } function showIt()
    {
    s++;
    if (s > 6)
    {
    window.clearInterval(ts);
    return false;
    }

    var pnode = document.getElementById("pn");
    var ndiv = document.createElement("DIV");
    ndiv.setAttribute("id", 'id'+s);
    ndiv.style.background = '#FFCC00';
    ndiv.style.border = 1+'px';
    ndiv.innerText = 'content'+s;
    ndiv.onmouseover = function () { this.style.background = '#3399FF';}
    ndiv.onmouseout = function () { this.style.background = '#FFCC00';}
    pnode.appendChild(ndiv);
    }</script>
    </HEAD><BODY>
    <div id="pn" onclick="gogo();return true;" style="cursor:hand;background:#66CC00;width:60px;">功能一</div>
    </BODY>
    </HTML>