zoukankan      html  css  js  c++  java
  • 结构 样式 行为 相分离

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    </head>
    <body>
        <div style=" 60px; margin: 0 auto">
            <input id='i1' type="text" value="请输入内容" onfocus="Focus()" onblur="Blur()">
    
        </div>
        <script>
            function Focus() {
                tag = document.getElementById('i1');
                val = tag.value;
                if (val == '请输入内容') {
                    tag.value = '';
    
                }
            }
            function Blur() {
                tag = document.getElementById('i1');
                val = tag.value;
                if (val.length==0){
                    tag.value = '请输入内容';
                }
    
            }
    
    
    
        </script>
    </body>
    </html>
  • 相关阅读:
    codeforces
    hdu
    hdu
    poj 2823
    hdu
    hdu
    hdu
    微信公众号 SDK
    PHP 正则表达式
    注册和登录时的验证码
  • 原文地址:https://www.cnblogs.com/my-love-is-python/p/9296185.html
Copyright © 2011-2022 走看看