NutzCN Logo
问答 $.support.pjax undefined
发布于 2337天前 作者 qq_e7d5a486 1520 次浏览 复制 上一个帖子 下一个帖子
标签:

Pjax参考Nutwk写法,但$.support.pjax一直是undefined,后来用

        support = $.support;
        for (key in support) {
            document.write('support.' + key + ' = ' + support[key] + '<br />');
        }

我的网页打印结果:

support.checkClone = true
support.noCloneChecked = true
support.clearCloneStyle = true
support.pixelPosition = function () { computeStyleTests(); return pixelPositionVal; }
support.boxSizingReliable = function () { computeStyleTests(); return boxSizingReliableVal; }
support.pixelMarginRight = function () { computeStyleTests(); return pixelMarginRightVal; }
support.reliableMarginLeft = function () { computeStyleTests(); return reliableMarginLeftVal; }
support.checkOn = true
support.optSelected = true
support.radioValue = true
support.focusin = false
support.cors = true
support.ajax = true
support.createHTMLDocument = true
support.transition = [object Object]

而Nutwk的打印结果:

support.ownLast = false
support.inlineBlockNeedsLayout = false
support.deleteExpando = true
support.leadingWhitespace = true
support.tbody = true
support.htmlSerialize = true
support.html5Clone = true
support.appendChecked = true
support.noCloneChecked = true
support.checkClone = true
support.noCloneEvent = true
support.submitBubbles = true
support.changeBubbles = true
support.focusinBubbles = false
support.shrinkWrapBlocks = function (){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}
support.opacity = true
support.cssFloat = true
support.clearCloneStyle = true
support.boxSizing = true
support.reliableHiddenOffsets = function (){return null==g&&i(),g}
support.boxSizingReliable = function (){return null==f&&i(),f}
support.pixelPosition = function (){return null==e&&i(),e}
support.reliableMarginRight = function (){return null==h&&i(),h}
support.getSetAttribute = true
support.style = true
support.hrefNormalized = true
support.checkOn = true
support.optSelected = true
support.enctype = true
support.optDisabled = true
support.input = true
support.radioValue = true
support.cors = true
support.ajax = true
support.pjax = true
support.transition = [object Object]

请问问题出在哪儿呢

2 回复

没导入pjax的js吧

已解决,是jquery版本问题,将jquery-3.2.1.js改为jquery-1.11.1.min.js正常了

添加回复
请先登陆
回到顶部