zoukankan      html  css  js  c++  java
  • placeholder 兼容处理

    <div class="f_border_two article-author clearfix">
                        <div class="m_input fl">
                            <input type="text" id="author" value="" name="" maxlength="50">
                            <label for="">姓名</label>
                            <p class="cue">请填写姓名</p>
                        </div>
                        <div class="m_input fl">
                            <input type="text" id="phone" value="" name="" maxlength="50">
                            <label for="phone">联系方式</label>
                            <p class="cue">请填写联系方式</p>
                        </div>
                        <div class="m_input fr">
                            <input type="text" id="school" value="" name="" maxlength="100">
                            <label for="school">所属学校</label>
                            <p class="cue">请填写所属学校</p>
                        </div>
                    </div>      

    //去掉input label 提示
                    $(".f_border_two input,.f_border_two textarea").on({
                        'focus': function () {
                            var self = $(this);
                            if (self.val() == '') {
                                self.siblings('label').hide();
                            }
                        },
                        'blur': function () {
                            var self = $(this);
                            if (self.val() == '') {
                                self.siblings('label').show();
                            }
                        }
                    });

  • 相关阅读:
    Pika的设计及实现
    高性能网络编程
    C语言的结构体
    消息队列库——ZeroMQ
    Diffie-Hellman密钥交换算法
    mysql-proxy 读写分离
    位运算
    分布式学习之一:事务
    Redis Cluster
    SpringBoot整合ActiveMQ,看这篇就够了
  • 原文地址:https://www.cnblogs.com/hhj3645/p/8856870.html
Copyright © 2011-2022 走看看