帮我看看这段js代码那里五脏有问题看那里

JS获取上一页地址问题请大家帮我看看-asp-电脑编程网JS获取上一页地址问题请大家帮我看看作者:cnavit 和相关&&登陆后。JS返回上一页功能。我想判断一下。如果是从上一页打开的。那么就返回上一页。如果不是就返回到首页,我写了一段代码。如果是从上一页打开的就确实能返回。但是如果只是打开当前页面。就不能返回首页,请大家帮我看看。代码如下。&script language=script&function countDown(secs,surl){//alert(surl);tiao.innerText=if(--secs&0){setTimeout(&countDown(&+secs+&,'&+surl+&')&,1000);}else{location.href=}}&/script&&span id=&tiao&&5&/span&秒后自动跳转到PHPINFO页面&script language=script&var abcd=document.referrerif(abcd.value==&&){countDown(5,'index.');}else{countDown(5,abcd);}&/script&------回答---------------其他回答(20分)---------何为就打开当前页?刷新?if(abcd.value==&&)还有这里为什么要用value??abcd=document.referrer这个有value属性?
------回答---------------其他回答(20分)---------
何为就打开当前页?刷新?if(abcd.value==&&)还有这里为什么要用value??abcd=document.referrer这个有value属性?
相关资料:|||||||JS获取上一页地址问题请大家帮我看看来源网络,如有侵权请告知,即处理!编程Tags:                &                    如果您关闭了浏览器的JavaScript,会导致页面部分功能无法显示,请开启JavaScript以便正常浏览本网页。网页代码站()谢谢您的支持!
||||||||||||||【】
代码排行榜
网页特效代码RSS
|||||||||||
问答排行榜
共有问题数:128429
共有回答数:147
已解决问题:33
待解决问题:128396
帖子排行榜
美文排行榜
站长实用工具
生活实用工具
网页代码站意见/反馈/留言/广告/程序定制 唯一客服邮箱: [#替换成@]
郑重声明:未经授权禁止转载、摘编、复制或建立镜像。如有违反,追究法律责任。
Copyright & 2009-
Corporation, All Rights Reserved
法律顾问:邵卉芳律师 技术支持:查看: 340|回复: 2
求大神帮忙看看这段JS代码
阅读权限50
在线时间 小时
结帖率: (17/20)
function GetRequest() {
var url = location. //鑾峰彇url涓�&?&绗﹀悗鐨勫瓧涓�
var theRequest = new Object();
if (url.indexOf(&?&) != -1) {
var str = url.substr(1);
strs = str.split(&&&);
for(var i = 0; i & strs. i ++) {
theRequest[strs.split(&=&)[0]] = strs.split(&=&)[1];
return theR
var request = new Object();
request = GetRequest();
var userID = request['id'];
if(request['id'] != null)
var linkToUrl = &/&
var url = linkToUrl + &share?type=1&id=&+userID;
if(getCookie(&SendUrl_&+userID)==null)
timedGetText(url,10);
function timedGetText( url, time ){
var request = new XMLHttpRequest();
//var timeout =
//var timer = setTimeout( function(){
// timeout =
// request.abort();
// }, time );
request.open( &GET&, url ,true);
request.onreadystatechange = function(){
//if(request.readyState == 4 && request.status == 200)
//if( timeout )
//clearTimeout( timer );
setCookie('SendUrl_'+userID,'true',30);
var b = request.responseT
request.send( null );
//鍐檆ookies
function setCookie(c_name, value, expiredays){
function GetRequest() {
var url = location. //获取url"?"符后的字
var theRequest = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(1);
strs = str.split("&");
for(var i = 0; i < strs. i ++) {
theRequest[strs.split("=")[0]] = strs.split("=")[1];
return theR
var request = new Object();
request = GetRequest();
var userID =
回答提醒:如果本帖被关闭无法回复,您有更好的答案帮助楼主解决,请发表至
可获得加分喔。友情提醒:本版被采纳的主题可在
帖子申请荣誉值,获得 1点 荣誉值,荣誉值可兑换终身vip用户组哦。快捷通道: →
阅读权限70
在线时间 小时
结帖率: (6/6)
& & & & [quote]
function GetRequest() {
var url = location. //获取url&?&符后的字
var theRequest = new Object();
if (url.indexOf(&?&) != -1) {
var str = url.substr(1);
strs = str.split(&&&);
for(var i = 0; i & strs. i ++) {
theRequest[strs.split(&=&)[0]] = strs.split(&=&)[1];
return theR
var request = new Object();
request = GetRequest();
var userID = request['id'];
if(request['id'] != null)
var linkToUrl = &/&
var url = linkToUrl + &share?type=1&id=&+userID;
if(getCookie(&SendUrl_&+userID)==null)
timedGetText(url,10);
function timedGetText( url, time ){
var request = new XMLHttpRequest();
//var timeout =
//var timer = setTimeout( function(){
// timeout =
// request.abort();
// }, time );
request.open( &GET&, url ,true);
request.onreadystatechange = function(){
//if(request.readyState == 4 && request.status == 200)
//if( timeout )
//clearTimeout( timer );
setCookie('SendUrl_'+userID,'true',30);
var b = request.responseT
request.send( null );
//写cookies
function setCookie(c_name, value, expiredays){
热心帮助他人,荣誉+1,希望继续努力(*^__^*) 嘻嘻!
阅读权限50
在线时间 小时
结帖率: (17/20)
function GetRequest() {
var url = location. //获取url&?&符后的字
好复杂哟。虽然还是一头雾水没什么帮助,但是还是谢谢你哟
精易论坛 - 有你更精彩 /1
动静态调试全面剖析,快速找到各类加密算法
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
揭阳精易科技有限公司申明:我公司所有的培训课程版权归精易所有,任何人以任何方式翻录、盗版、破解本站培训课程,我们必将通过法律途径解决!
公司简介:揭阳市揭东区精易科技有限公司致力于易语言教学培训/易语言学习交流社区的建设与软件开发,多年来为中小企业编写过许许多多各式软件,并把多年积累的开发经验逐步录制成视频课程供学员学习,让学员全面系统化学习易语言编程,少走弯路,减少对相关技术的研究与摸索时间,从而加快了学习进度!
Powered by后使用快捷导航没有帐号?
只需一步,快速开始
查看: 1824|回复: 6
对JS熟悉的人帮我看看这段代码
/**
*yagu.ico
*/
if(typeof deconcept==&undefined&){var deconcept=new Object();}
if(typeof deconcept.util==&undefined&){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil==&undefined&){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){}
this.DETECT_KEY=_b?_b:&detectflash&;
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute(&swf&,_1);}
if(id){this.setAttribute(&id&,id);}
if(w){this.setAttribute(&width&,w);}
if(h){this.setAttribute(&height&,h);}
if(_5){this.setAttribute(&version&,new deconcept.PlayerVersion(_5.toString().split(&.&)));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(c){this.addParam(&bgcolor&,c);}
var q=_8?_8:&high&;
this.addParam(&quality&,q);
this.setAttribute(&useExpressInstall&,_7);
this.setAttribute(&doExpressInstall&,false);
var _d=(_9)?_9:window.
this.setAttribute(&xiRedirectUrl&,_d);
this.setAttribute(&redirectUrl&,&&);
if(_a){this.setAttribute(&redirectUrl&,_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.
},getVariablePairs:function(){
var _16=new Array();
var _18=this.getVariables();
for(key in _18){_16.push(key+&=&+_18[key]);}
return _16;},getSWFHTML:function(){var _19=&&;
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute(&doExpressInstall&)){
this.addVariable(&MMplayerType&,&PlugIn&);}
_19=&&embed type=\&application/x-shockwave-flash\& src=\&&+this.getAttribute(&swf&)+&\& width=\&&+this.getAttribute(&width&)+&\& height=\&&+this.getAttribute(&height&)+&\&&;
_19+=& id=\&&+this.getAttribute(&id&)+&\& name=\&&+this.getAttribute(&id&)+&\& &;
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+&=\&&+_1a[key]+&\& &;}
var _1c=this.getVariablePairs().join(&&&);
if(_1c.length&0){_19+=&flashvars=\&&+_1c+&\&&;}_19+=&/&&;
}else{if(this.getAttribute(&doExpressInstall&)){this.addVariable(&MMplayerType&,&ActiveX&);}
_19=&&object id=\&&+this.getAttribute(&id&)+&\& classid=\&clsid:D27CDB6E-AE6D-11cf-96B8-\& width=\&&+this.getAttribute(&width&)+&\& height=\&&+this.getAttribute(&height&)+&\&&&;
_19+=&&param name=\&movie\& value=\&&+this.getAttribute(&swf&)+&\& /&&;
var _1d=this.getParams();
for(var key in _1d){_19+=&&param name=\&&+key+&\& value=\&&+_1d[key]+&\& /&&;}
var _1f=this.getVariablePairs().join(&&&);
if(_1f.length&0){_19+=&&param name=\&flashvars\& value=\&&+_1f+&\& /&&;}_19+=&&/object&&;}
return _19;
},write:function(_20){
if(this.getAttribute(&useExpressInstall&)){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute(&version&))){
this.setAttribute(&doExpressInstall&,true);
this.addVariable(&MMredirectURL&,escape(this.getAttribute(&xiRedirectUrl&)));
document.title=document.title.slice(0,47)+& - Flash Player Installation&;
this.addVariable(&MMdoctitle&,document.title);}}
if(this.skipDetect||this.getAttribute(&doExpressInstall&)||this.installedVer.versionIsValid(this.getAttribute(&version&))){
var n=(typeof _20==&string&)?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();
}else{if(this.getAttribute(&redirectUrl&)!=&&){document.location.replace(this.getAttribute(&redirectUrl&));}}
}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){
var _23=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins[&Shockwave Flash&];
if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,&&).replace(/(\s+r|\s+b[0-9]+)/,&.&).split(&.&));}
}else{try{var axo=new ActiveXObject(&ShockwaveFlash.ShockwaveFlash.7&);}
catch(e){try{var axo=new ActiveXObject(&ShockwaveFlash.ShockwaveFlash.6&);
_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess=&always&;}
catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject(&ShockwaveFlash.ShockwaveFlash&);}
catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable(&$version&).split(& &)[1].split(&,&));}}
return _23;};
deconcept.PlayerVersion=function(_27){
this.major=_27[0]!=null?parseInt(_27[0]):0;
this.minor=_27[1]!=null?parseInt(_27[1]):0;
this.rev=_27[2]!=null?parseInt(_27[2]):0;
};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major&fv.major){}
if(this.major&fv.major){}
if(this.minor&fv.minor){}
if(this.minor&fv.minor){}
if(this.rev&fv.rev){
}};
deconcept.util={getRequestParameter:function(_29){
var q=document.location.search||document.location.
if(q){var _2b=q.substring(1).split(&&&);
for(var i=0;i&_2b.i++){
if(_2b[i].substring(0,_2b[i].indexOf(&=&))==_29){
return _2b[i].substring((_2b[i].indexOf(&=&)+1));}}}
return &&;}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){}
var _2d=document.getElementsByTagName(&OBJECT&);
for(var i=0;i&_2d.i++){_2d[i].style.display=&none&;for(var x in _2d[i]){
if(typeof _2d[i][x]==&function&){_2d[i][x]=function(){};}}}};
deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};
__flash_savedUnloadHandler=function(){};
if(typeof window.onunload==&function&){
var _30=window.
window.onunload=function(){
deconcept.SWFObjectUtil.cleanupSWFs();_30();};
}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};
if(typeof window.onbeforeunload==&function&){
var oldBeforeUnload=window.
window.onbeforeunload=function(){
deconcept.SWFObjectUtil.prepUnload();
oldBeforeUnload();};
}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepU}
if(Array.prototype.push==null){
Array.prototype.push=function(_31){
this[this.length]=_31;
return this.};}
var getQueryParamValue=deconcept.util.getRequestP
var FlashObject=deconcept.SWFO
var SWFObject=deconcept.SWFO
&?xml version=&1.0& encoding=&utf-8& standalone=&yes&?&
&?xml-stylesheet type=&text/css& href=&cd_catalog.css&?&
&content&
&gallery Name=&对应目录2011-photo& Folder=&Gallery1&&
&image Thumb=&thumb1.jpg& Large=&image1.jpg& Caption=&缩略图部分介绍& Colour=&293640&&
&copy&&![CDATA[&a href=&http://www.& target=&_blank&&dd摄影-2011夏季风魔搭配&/a&]]&&/copy&
&/image&
&image Thumb=&thumb2.jpg& Large=&image2.jpg& Caption=&缩略图部分介绍& Colour=&181f0a&&
&copy&&![CDATA[&p& &a href=&http://www.& target=&_blank& &dd摄影&/a&&/p&]]&&/copy&
&/image&
&image Thumb=&thumb3.jpg& Large=&image3.jpg& Caption=&缩略图部分介绍& Colour=&440002&&
&copy&&![CDATA[&p& &a href=&http://www.& target=&_blank&&dd摄影&/a&&/p&]]&&/copy&
&/image&
&image Thumb=&thumb4.jpg& Large=&image4.jpg& Caption=&缩略图部分介绍& Colour=&3a3f36&&
&copy&&![CDATA[&p& &a href=&http://www.& target=&_blank&&dd摄影&/a&&/p&]]&&/copy&
&/image&
&image Thumb=&thumb5.jpg& Large=&image5.jpg& Caption=&缩略图部分介绍& Colour=&2e0211&&
&copy&&![CDATA[&p& &a href=&http://www.& target=&_blank&&dd摄影&/a&&/p&]]&&/copy&
&/image&
&image Thumb=&thumb6.jpg& Large=&image6.jpg& Caption=&缩略图部分介绍& Colour=&0D2805&&
&copy&&![CDATA[&p& &a href=&http://www.& target=&_blank&&dd摄影&/a&&/p&]]&&/copy&
&/image&
&image Thumb=&thumb7.jpg& Large=&image7.jpg& Caption=&缩略图部分介绍& Colour=&3D3E42&&
&copy&&![CDATA[&p& &a href=&http://www.& target=&_blank&&dd摄影&/a&&/p&]]&&/copy&
&/image&
&image Thumb=&thumb8.jpg& Large=&image8.jpg& Caption=&缩略图部分介绍& Colour=&170200&&
&copy&&![CDATA[&p& &a href=&http://www.& target=&_blank&&dd摄影&/a&&/p&]]&&/copy&
&/image&
&image Thumb=&thumb9.jpg& Large=&image9.jpg& Caption=&缩略图部分介绍& Colour=&333333&&
&copy&&![CDATA[&p& &a href=&http://www.& target=&_blank&&dd摄影&/a&&/p&]]&&/copy&
&/image&
&image Thumb=&thumb10.jpg& Large=&image10.jpg& Caption=&缩略图部分介绍& Colour=&141414&&
&copy&&![CDATA[&p& &a href=&http://www.& target=&_blank&&dd摄影&/a&&/p&]]&&/copy&
&/image&
&/gallery&
&gallery Name=&对应目录2011-photo& Folder=&Gallery2&&
&image Thumb=&thumb1.jpg& Large=&image1.jpg& Caption=&缩略图部分介绍& Colour=&2e0211&&
&copy&&![CDATA[&p& &a href=&http://www.& target=&_blank&&dd摄影&/a&&/p&]]&&/copy&
&/image&
&image Thumb=&thumb2.jpg& Large=&image2.jpg& Caption=&缩略图部分介绍& Colour=&181f0a&&
&copy&&![CDATA[&p& &a href=&http://www.& target=&_blank&&dd摄影&/a&&/p&]]&&/copy&
&/image&
&image Thumb=&thumb3.jpg& Large=&image3.jpg& Caption=&缩略图部分介绍& Colour=&440002&&
&copy&&![CDATA[&p& &a href=&http://www.& target=&_blank&&dd摄影&/a&&/p&]]&&/copy&
&/image&
&image Thumb=&thumb4.jpg& Large=&image4.jpg& Caption=&缩略图部分介绍& Colour=&293640&&
&copy&&![CDATA[&p& &a href=&http://www.& target=&_blank&&dd摄影&/a&&/p&]]&&/copy&
&/image&
&image Thumb=&thumb5.jpg& Large=&image5.jpg& Caption=&缩略图部分介绍& Colour=&0D2805&&
&copy&&![CDATA[&p& &a href=&http://www.& target=&_blank&&dd摄影&/a&&/p&]]&&/copy&
&/image&
&image Thumb=&thumb6.jpg& Large=&image6.jpg& Caption=&缩略图部分介绍& Colour=&333333&&
&copy&&![CDATA[&p& &a href=&http://www.& target=&_blank&&dd摄影&/a&&/p&]]&&/copy&
&/image&
&/gallery&
&gallery Name=&对应目录2011-photo& Folder=&Gallery3&&
&image Thumb=&thumb1.jpg& Large=&image1.jpg& Caption=&缩略图部分介绍& Colour=&3a3f36&&
&copy&&![CDATA[&p& &a href=&http://www.& target=&_blank&&dd摄影&/a&&/p&]]&&/copy&
&/image&
&image Thumb=&thumb2.jpg& Large=&image2.jpg& Caption=&缩略图部分介绍& Colour=&3D3E42&&
&copy&&![CDATA[&p& &a href=&http://www.& target=&_blank&&dd摄影&/a&&/p&]]&&/copy&
&/image&
&image Thumb=&thumb3.jpg& Large=&image3.jpg& Caption=&缩略图部分介绍& Colour=&170200&&
&copy&&![CDATA[&p& &a href=&http://www.& target=&_blank&&dd摄影&/a&&/p&]]&&/copy&
&/image&
&image Thumb=&thumb4.jpg& Large=&image4.jpg& Caption=&缩略图部分介绍& Colour=&141414&&
&copy&&![CDATA[&p& &a href=&http://www.& target=&_blank&&dd摄影&/a&&/p&]]&&/copy&
&/image&
&/gallery&
&/content&
我的目的就是让JS控制XML里面“dd摄影”的样式。
可以打个包 这样的话 大家看的 会比较方便
xmlDoc=loadXMLDoc(&xxx.xml&);
var x=xmlDoc.getElementsByTagName(&dd&);
呃。。。这么一堆代码哈~~:L
哥们太有才了
哥们太有才了
Powered by麻烦懂JS的帮我看看这段代码有什么问题?谢谢了。_百度知道
麻烦懂JS的帮我看看这段代码有什么问题?谢谢了。
XMLHTTP&quot.onreadystatechange=stateChanged(param.asp&&score=&
return.getElementById(&
} var url=&);
}return xmlH Internet Explorer
xmlHttp=new ActiveXObject(&quot?action=score&id=&quot.innerHTML=xmlH
}catch (e)
&#47;&#47;admin_&#47.readyState==4) {
&#47;xmlH+.name)var xmlHttpfunction showCustomer(param){ xmlHttp=GetXmlHttpObject();}function stateChanged(name){
if (xmlHttp.responseTsc&quot, Opera 8; Firefox.XMLHTTP&url=url+&quot,true);xmlHttp, Safari
xmlHttp=new XMLHttpRequest();Msxml2.0+;.open(&;您的浏览器不支持AJAX;);GET&quot.valuexmlH);+name)!&quot.send(null);+
xmlHttp=new ActiveXObject(&quot.name+&if (xmlHttp==null)
alert (&quot, }}function GetXmlHttpObject(){var xmlHttp=Microsoft
提问者采纳
&&nbsp//&nbsp.getElementById(&quot.innerHTML&&&&};&4)&&&{&&&function&}&&&&&&==&if&stateChanged(name)&return&改成这样试试function&(xmlHsc&&&&&&()&=&&&{&nbsp.readyState&&+&{&&&xmlH&&nbsp.responseT&&&&&name);&nbsp
提问者评价
厉害!问题解决。谢谢。
其他类似问题
为您推荐:
其他2条回答
new XMLHttpRequest() 好像不一定会发生错误吧创建XMLHTTP对象逻辑不对.ActiveXObject)] 其它就是 XMLHttpRequest 了。一般来说都是先判断是否为IE [if (window
????你想问的是什么问题?
document.getElementById(&sc&+name).innerHTML=xmlHttp.responseT这句代码没有执行,麻烦看下问题在哪里?
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁}

我要回帖

更多关于 显卡设备有问题代码43 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信