zoukankan      html  css  js  c++  java
  • js

    <html><head lang="en">
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
    
      <!--<input value="222222" onclick="test1();" onselect="test2();">-->
    
    
    
      <!--<script>-->
           <!--// 网页或者图片被加载完毕时候调用-->
    <!--//      window.onload = function(){-->
    <!--//          alert(0);-->
    <!--//      };-->
    
           <!--var input = document.getElementsByTagName('input')[0];-->
           <!--function test1(){-->
              <!--// 去除外边框-->
              <!--input.style.outline = 'none';-->
              <!--// 改变宽度和高度-->
              <!--input.style.width = '550px';-->
              <!--input.style.height = '33px';-->
              <!--// 改变外边距-->
              <!--input.style.margin = '20px 0px 20px 0px';-->
           <!--}-->
    
            <!--function test2(){-->
               <!--alert(input.value);-->
            <!--}-->
    
      <!--</script>-->
    
    
    <!--第二种方式-->
        <input value="hello world!" style="outline: none;  550px; height: 33px; margin: 20px 0px;">
    
        <script>
            // 拿到标签
            var input = document.getElementsByTagName('input')[0];
            input.onclick = function(){
                // 去除外边框
                input.style.outline = 'none';
                // 改变宽度和高度
                input.style.width = '550px';
                input.style.height = '33px';
                // 改变外边距
                input.style.margin = '20px 0px 20px 0px';
            }
    
            input.onselect = function(){
                alert(input.value);
            }
        </script>
    
    </body></html>
  • 相关阅读:
    Repeater使用二
    db2, oracle和sqlserver取前几行的语法
    AspNet 路径问题
    PL/Sql 中创建、调试、调用存储过程
    ORA错误编码
    PL/SQL 设置
    常用命令行
    SQL Server将单表数据导出成insert脚本形式
    获取Url链接内容
    Oracle安装注意事项
  • 原文地址:https://www.cnblogs.com/yintingting/p/4624103.html
Copyright © 2011-2022 走看看