• Jquery知识


     1、窗口自适应调整 (设置layout的fit属性值为true即可)

    //窗口自适应调整      
    $(function() {  
        windowResize();  //文档载入时加载  
        $(window).resize(function() {  
            windowResize();  //窗口改变大小时加载  
        });  
    });  
      
    function windowResize() {  
        var width = $(window).width()-10;   //减去10与body中margin:5px共同作用:为body留的边距  
        var height = $(window).height()-10;  
    //  $('form#form1').width(width);  
    //  $('form#form1').height(height);  
    //  $('form#form1').layout();  //相当于<form id='form1' class='easyui-layout' data-options = "fit:true" runat="server">  
          
          
        $('#autoFitWindow').width(width);  
        $('#autoFitWindow').height(height);  
        $('#autoFitWindow').layout();  //为div设置
    }  
    View Code

     2、Javascript取URL传参(正则表达式)

      a.html 发送请求页面

    <script type="text/javascript">
            function dbSelRow(){
                var id= '001';
                window.location.href = "b.html?id=" + id+"&name=sc";
            }
    </script>
    View Code

      b.html 接收请求页面

    <script type="text/javascript">
            var CST_CODE;
            var id;
            $(function () {
                CST_CODE = Request.QueryString("cstCode");
                id=Request.QueryString("id");
                var name=Request.QueryString("name");
            });
            Request = {
                QueryString : function(paramName){
                    var reg = new RegExp("[?&]" + paramName + "=([^&]*)[&]?", "i");
                    var paramVal = window.location.search.match(reg);
                    return paramVal == null ? "" : paramVal[1];
                }
            }
     </script>
    View Code
  • 相关阅读:
    Andriod开发环境配置
    Java调用WebService
    Message Modem Develop
    Call .so in Linux
    How to unpack a tar file in windows
    Visual Studio 2010工程目录下的ipch文件夹和.sdf文件
    TWAIN学习记录
    几种调用扫描仪的方案
    Gzip Practice
    Twain Practice
  • 原文地址:https://www.cnblogs.com/shenchao/p/4629594.html
Copyright © 2020-2023  润新知