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();
                            }
                        }
                    });

  • 相关阅读:
    安装centos出现的问题
    linux学习笔记
    sails框架结合mocha的测试环境搭建
    sails框架结合mocha
    使用postman发送http请求
    C++之易混淆知识点三---算法分析
    复习一下单链表的常用操作
    C++之易混淆知识点二
    FPGA之阻塞赋值与非阻塞赋值
    C++之易混淆知识点一-----static详解
  • 原文地址:https://www.cnblogs.com/hhj3645/p/8856870.html
Copyright © 2011-2022 走看看