基于 jquery 的片段异步加载 jquery-fjax

码农软件 · 软件分类 · jQuery界面效果 · 2020-01-01 09:11:52

软件介绍

jquery-fjax 页面片段异步加载

  • 基于锚点技术,支持所有浏览器,不需要浏览支持 history.pushState

  • 如果支持客户浏览器都支持 history.pushState ,建议使用 pjax

  • 需要引入 jquery 库,开发版本选用的是v2.2.1,其它版本未验证

  • QQ:16349023

    <script th:src="@{${prefixPath}+'/assets/plugins/jquery-fjax/jquery.fjax.js'}" src="/assets/plugins/jquery-fjax/jquery.fjax.js"></script>
    <script  type="text/javascript" th:inline="javascript">
    /*<![CDATA[*/
    $(function() {
        var fjax_options = {
            fragment:'#pagecontent',
            prefix:'/manage/',
            beginLoad:function () {
                console.log("begin");
            },
            endLoad:function () {
                console.log("end");
            },
            success:function () {
                console.log("success");
            },
            error:function () {
                console.log("error");
            },
            'default_url': 'main',//default hash
            'content_url': function(hash,prefix) {
                //***NOTE***
                //this is for Ace demo only, you should change it to return a valid URL
                //please refer to documentation for more info
                var hashValue=hash;
                var path = document.location.pathname;
                //var requestUrl=path + "/" +hashValue.replace(/^page\//, '');
                //var requestUrl=path + "/" +hashValue;
                console.log(prefix);
                var requestUrl=prefix+hashValue;
                console.log(requestUrl);
                return requestUrl;
            }
        }
        $('.page-content-area').fjax(fjax_options);
    });
    
    /*]]>*/
    </script>

本文地址:https://codercto.com/soft/d/22409.html

信息论基础

信息论基础

Thomas M.Cover、Joy A.Thomas / 清华大学出版社 / 2003-11-1 / 65.00元

《国际知名大学原版教材•信息论基础》系统介绍了信息论基本原理及其在通信理论、统计学、计算机科学、概率论以及投资理论等领域的应用。作者以循序渐进的方式,介绍了信息量的基本定义、相对熵、互信息以及他们如何自然地用来解决数据压缩、信道容量、信息率失真、统计假设、网络信息流等问题。一起来看看 《信息论基础》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具