zoukankan      html  css  js  c++  java
  • 动态增加属性


    <html>

    <script>

    functionck()

    {

    vartruename;

    document.form1.sele.options[0].truename="11111";

    }

    functionck1()

    {

    alert(document.form1.sele.options[0].truename);

    }

    functionck2()

    {

    document.form1.sele.value="3";

    alert(document.form1.sele.value);

    alert(document.form1.sele.options[document.form1.sele.selectedIndex].value);

    }

    </script>

    <body>

    <formname=form1>

    <selectname=sele>

    <optionvalue=1>1</option>

    <optionvalue=2>2</option>

    <optionvalue=3>3</option>

    </select>

    <inputtype=button onclick="ck();" value="给select增加属性">

    <inputtype=button onclick="ck1();" value="检查;">

    <inputtype=button onclick="ck2();" value="检查select的值;">

    </form>

    <script>

    //ck();

    </script>

    </body>

    </html>

    right:-�t>�L �ٳg=EN-US><br><ahref="javascript:alert('X:'+block.xpos)">横向位置</a>

    <br><ahref="javascript:alert('Y:'+block.ypos)">竖向位置</a>

    <br><ahref="javascript:showObject(block)">显示</a>

    <br><ahref="javascript:hideObject(block)">隐藏</a>

    <br>移动moveto:

    <br><ahref="javascript:moveto(block,100,200)">(100,200)</a>

    <br><ahref="javascript:moveto(block,200,260)">(200,260)</a>

    <br><ahref="javascript:moveto(block,300,340)">(300,340)</a>

    <br>相对移动moveby:

    <br><ahref="javascript:moveby(block,10,0)">(10,0)</a>

    <br><ahref="javascript:moveby(block,-10,0)">(-10,0)</a>

    <br><ahref="javascript:moveby(block,0,10)">(0,10)</a>

    <br><ahref="javascript:moveby(block,0,-10)">(0,-10)</a>

    <divid="blockdiv"style="position:absolute;left:100;top:200;30;visibility:visible;">

    sktjyerlwo;ekrw;

    <IMG SRC="1.jpg"border=0>

    </div>

    </body>

    </html>

  • 相关阅读:
    BZOJ3578:GTY的人类基因组计划2(集合hash,STL)
    【BZOJ 1022】 [SHOI2008]小约翰的游戏John
    【BZOJ 1295】 [SCOI2009]最长距离
    【BZOJ 1103】 [POI2007]大都市meg
    【BZOJ 3172】 [Tjoi2013]单词
    【BZOJ 1067】 [SCOI2007]降雨量
    【BZOJ 1491】 [NOI2007]社交网络
    【BZOJ 1087】[SCOI2005]互不侵犯King
    【BZOJ 1009】 [HNOI2008]GT考试
    【BZOJ 1053】[HAOI2007]反素数ant
  • 原文地址:https://www.cnblogs.com/liaoshiyong/p/3150911.html
Copyright © 2011-2022 走看看