zoukankan      html  css  js  c++  java
  • easyui placeholder 解决方案

    最近,再用easyui的时候,发现easyui的input标签不支持h5的placeholder,为了实现这个效果,提供以下解决方案:

      1.给input标签设置placeholder.

      <td><input class="easyui-numberbox" data-options="min:0,max:800,precision:0" placeholder="默认为最大"></td>

      2.当页面加载完毕的时候,将easyui生成的input标签的placeholder重新设置.

      

    $(function(){
    window.onload = numberInputPlaceholder();
    });
    /**
    easyui number placeholder
    */
    function numberInputPlaceholder(){
    $(".easyui-numberbox").each(function(i){
    var span = $(this).siblings("span")[0];
    var targetInput = $(span).find("input:first");
    if(targetInput){
    $(targetInput).attr("placeholder", $(this).attr("placeholder"));
    }

    });
    }

  • 相关阅读:
    近似计算π(for循环)
    apache部署mo_python
    文件注释方法
    算法效率的度量
    ssh
    使用类名创建对象
    筛选网址
    常用django命令
    查看和关闭端口
    update脚本出错
  • 原文地址:https://www.cnblogs.com/xiaohanima/p/5063159.html
Copyright © 2011-2022 走看看