zoukankan      html  css  js  c++  java
  • 个人日常笔记

    1. datebox设置默认时间
    $(document).ready(function() {    
             $("#start").datebox("setValue",myformatter( new Date()));
             $("#end").datebox("setValue",myformatter( new Date()));
             /* $(".datebox :text").attr("readonly","readonly"); */
        });
    
        function myformatter(date){  
            var y = date.getFullYear();  
            var m = date.getMonth()+1;  
            var d = date.getDate();  
            return y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d);  
        }

    2.easyui input设置为日期 class="easyui-datebox"

    class="easyui-datetimebox"  带时分秒

    3.easyui input标签动态变成下拉框

    供货商:<input type="text" id="from_customer_id" style="70px;height:20px;" />
        $('#from_customer_id').combobox({   
                      url:'${ctx}/admin/repo_tool/listSelect',   
                      valueField:'id',   
                      textField:'customername',
                      panelHeight:'100',
                      editable:false,
                });    
        Controller方法加头:@RequestMapping("/listSelect")
                            @ResponseBody        
    
        如果想获取下拉框的值  用这个:  .combobox("getValue");

    4. 背景图为灰色

    background-color:rgb(235, 235, 228)"

    5. 输入框去空格

    onkeyup="value=value.replace(/s/g,'')"

    6. 输入框只能输入数字以及去空格

    onkeyup="this.value=this.value.replace(/D/g,'')"  onafterpaste="this.value=this.value.replace(/D/g,'')"

    7. 边框为灰色,背景也为灰色

    style='background-color:#ccc;border-bottom:2px solid #ccc'

    8. jquery 获取easyui combobox选中的值

    $('#comboboxlist').combobox('getValue');

     9.EasyUI combotree 赋值

    $('#{$namespace}menu_id').combotree('setValues', '{$menu_id}'); 
  • 相关阅读:
    验证码缓存问题完美解决方案
    最近项目是跟框架有关的两个问题
    未与信任 SQL Server 连接相关联
    Get请求
    Post请求
    jQuery操作元素
    Dom对象和jQuery包装集
    XMLHttpRequest对象
    jQuery事件与事件对象
    处理数据集
  • 原文地址:https://www.cnblogs.com/weiloong/p/4871188.html
Copyright © 2011-2022 走看看