ecshop中使用Jquery特效报错“b.replace is not a function”
匿名 · 更新于 2015/10/31
将ecshop二次开发中,使用jQuery特效的时候
结果运行始终提示js错误:
TypeError: b.replace is not a function
1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var" a.style.opacity}}},cssnumber:{fillopacity:!0,fontweight:!0,lineheight:!0,opacity:!0,orphans:!0,widows:!0,zindex:!0,zoom:!0},cssprops:{"float":f.support.cssfloat?"cssfloat":"stylefloat"},style:function(a,c,d,e){if(!!a&&a.nodetype!="=3&&a.nodeType!==8&&!!a.style){var" g,h,i="f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in" k&&(g="k.get(a,!1,e))!==b)return" g;return="" j[c]}h="typeof" d,h="=="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in" k)||(d="k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var" e,g;c="f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in" g&&(e="g.get(a,!0,d))!==b)return" e;if(by)return="" by(a,c)},swap:function(a,b,c){var="" b)d[f]="a.style[f],a.style[f]=b[f];e=c.call(a);for(f" b)a.style[f]="d[f];return" e}}),f.curcss="f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var" c,d,e,g,h="a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return" c}),c.documentelement.currentstyle&&(ba="function(a,b){var" c,d,e,f="a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return" f="==""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return" a.offsetwidth!="=0?bB(a,b,d):f.swap(a,bw,function(){return" bb(a,b,d)})},set:function(a,b){return="" bs.test(b)?b+"px":b}}}),f.support.opacity||(f.csshooks.opacity="{get:function(a,b){return" bq.test((b&&a.currentstyle?a.currentstyle.filter:a.style.filter)||"")?parsefloat(regexp.$1)="" 100+"":b?"1":""},set:function(a,b){var="" "+e}}),f(function(){f.support.reliablemarginright||(f.csshooks.marginright="{get:function(a,b){return" f.swap(a,{display:"inline-block"},function(){return="" b?by(a,"margin-right"):a.style.marginright})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden="function(a){var" d,e="typeof" "):[c],f="{};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return var="" bc="/%20/g,bD=/[]$/,bE=/r?n/g,bF=/#.*$/,bG=/^(.*?):[" bh=""/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^///,bL=/?/,bM=/)<[^<]*)*</script">/gi,bN=/^(?:select|textarea)/i,bO=/s+/,bP=/([?&])_=[^&]*/,bQ=/^([w+.-]+:)(?://([^/?#:]*)(?::(d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof" br.apply(this,arguments);if(!this.length)return="" this;var="" e="a.indexOf("" ");if(e>="0){var" i="this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
|
<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return var="" bc="/%20/g,bD=/[]$/,bE=/r?n/g,bF=/#.*$/,bG=/^(.*?):[" bh=""/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^///,bL=/?/,bM=/)<[^<]*)*</script"><300||a===304){if(d.ifmodified){if(y=v.getresponseheader("last-modified"))f.lastmodified[k]=y;if(z=v.getresponseheader("etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else r="cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof" instanceof="" h="f.Deferred(),i=f.Callbacks("once" j="d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var" return="" s="==2)){v.abort();return!1}for(u"" a="a||"abort",p&&p.abort(a),w(0,a);return" v.success="v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var" b="" d.url="((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof" d.data="f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete"" k="d.url;if(d.cache===!1){var" x="f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?"," q="0.01":""):d.accepts["*"]);for(u" p="bZ(bT,d,c,v);if(!p)w(-1,"No" v.readystate=""1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout"><2)w(-1,z);else throw="" return="" var="" cc="f.now(),cd=/(=)?(&|$)|??/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return" json="" b.data="="string"&&/^application/x-www-form-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var" h="a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var" was="" not="" application="" script:="" ecmascript="" text="" a.cache="==b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var" ce="a.ActiveXObject?function(){for(var" cf="0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in" d="function(a,e){var" h.readystate="==4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete" j="new" cj="{},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+-]=)?([d+.-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var" a="parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function" g="=="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i" function="" e.queue="==!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof" k="f.cssHooks[g])&&"expand"in" l="k.expand(a[g]),delete" i="" c="!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b" b="f.css(this.elem,this.prop);return" d.duration="="number"?d.duration:d.duration" d.queue="=null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return" this.options="b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return" e=""cq||cr(),g=!0,h=this.elem,i=this.options;if(a||e">

最后发现是transport.js文件中的
Object.prototype.toJSONString = function () {}
引起的。
删除该函数会影响其它的地方,那该怎么办呢,有一个好办法可以解决.
delete(Object.prototype.toJSONString);
将该语句放在js文件的开始位置就可以了。
