zoukankan      html  css  js  c++  java
  • CSS之Document方法的使用

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>使用Document方法</title>
    <style type="text/css">
    body{font-size:14px;
         line-height:30px;
         }
    input{margin:1px;
          90px;
          font-size:12px;
          padding:0;
          }
    #node{
        100px;
        font-size:24px;
        font-weight:bold;
        float: left;
        }
    </style>
    <script  type="text/javascript">
    function changeLink(){
       document.getElementById("node").innerHTML="搜狐";
    }
     
    function all_input(){
      var aInput=document.getElementsByTagName("input");
       var sStr="";
      for(var i=0;i<aInput.length;i++){
        sStr+=aInput[i].value+"<br />";
        }
       document.getElementById("s").innerHTML=sStr;
    }
         
    function s_input(){
      var aInput=document.getElementsByName("season");
      var sStr="";
      for(var i=0;i<aInput.length;i++){
        sStr+=aInput[i].value+"<br />";
        }
        document.getElementById("s").innerHTML=sStr;
        }
     
    </script>
    </head>
     
    <body>
    <div id="node">新浪</div>
    <input name="b1" type="button" value="改变层内容" onclick="changeLink();" /><br />
    <br /><input name="season" type="text" value="春" />
    <input name="season" type="text" value="夏" />
    <input name="season" type="text" value="秋" />
    <input name="season" type="text" value="冬" />
    <br /><input name="b2" type="button" value="显示input内容" onclick="all_input()" />
    <input name="b3" type="button" value="显示season内容" onclick="s_input()" />
    <p id="s"></p>
    </body>
    </html>
    

    不努力,还要青春干什么?
  • 相关阅读:
    《ERP从内部集成起步》读书笔记——第5章 MRP系统的时间概念 5.1 时间三要素 5.1.1 计划期
    MVC 图片上传小试笔记
    MVC3 something about form
    dotnetcharting.dll 菜鸟笔记
    MVC 下分离业务逻辑,优化修改
    看不见的女朋友
    相信自己
    肉体的痛苦给心灵的折磨一个宣泄的出口
    八零后为什么比我们那时还艰难
    一个人住七年
  • 原文地址:https://www.cnblogs.com/caidupingblogs/p/4927286.html
Copyright © 2011-2022 走看看