|
snoke @ 2007-04-04 18:13 下列情况是从浏览器的地址栏正常取得request.servervariables("http_referer")的: 1.直接用<a href> 2.用submit或<input type=image>提交的表单(post or get) 3.使用jscript提交的表单(post or get) 下面我们再看看request.servervariables("http_referer")不能正常取值的情况: 1.从收藏夹链接 2.单击主页或者自定义的地址 3.利用jscript的location.href or location.replace() 4.在浏览器直接输入地址 5.<%response.redirect%> 6.<%response.addheader%>或<meta http-equiv=refresh>转向 7.用xml加载地址 显然,request.servervariables("http_referer")在多数情况下是不能正常工作的,下面我们看一个例子: ref.asp <% response.write "you came from: " & request.servervariables("http_referer") %> ref.htm <% response.addheader "refresh", "10;url=ref.asp" %> <meta http-equiv=refresh content=10;url=ref.asp> <form method=get action=ref.asp name=getform> <input type=submit value= go there (get) >> > <input type=image style=cursor:hand> </form><p> 看看上面的代码会得到什么的结果. <form method=post action=ref.asp name=postform> <input type=submit value= go there (post) >> > <input type=image style=cursor:hand> </form><p> <a href=ref.asp>直接链接</a><p> <a href=# onclick=window.location.href="ref.asp";return false;>javascript location</a><p> <a href=#onclick=window.location.replace("ref.asp");return false;>javascript replace</a><p> <a href=# onclick=document.getform.submit();return false;>javascript get</a><p> <a href=# onclick=document.postform.submit();return false;>javascript post</a> |
|
snoke @ 2007-03-22 17:51 IE里window的method列表 alert(sMsg) //弹出一个确认消息框 attachEvent(sEvent,pFunction) //绑定一个函数到某个事件,事件触发时随机执行其中一个被绑定的函数 blur() //令窗口丧失焦点 clearInterval(iIntervalID) //清除指定定时器的关联函数 clearTimeout(iTimeoutID) //清除指定延时器的关联函数 close() //关闭窗口,如果窗口不是用脚本打开的,会弹出确认对话框。 confirm([sMessage]) //弹出“确定/取消”对话框 createPopup([vArgs]) //创建一个隐藏的弹出式窗口,vArgs是未来考虑提供的参数,返回窗口句柄 detachEvent(sEvent,pFunction) //取消一个事件的某个绑定函数 execScript(sExpression, sLanguage) //用指定的语言执行代码 focus() //激活窗口 moveBy(iX,iY) //用相对方式移动窗口 moveTo(iLeft,iTop) //用绝对方式移动窗口 navigate(sURL) //转到指定的连接 open( [sURL] [, sName] [, sFeatures] [, bReplace]) //打开新窗口,并返回窗口句柄 //sName=(*_blank:打开一个新的未命名窗口;_parent:在父窗口中打开;_search:同时打开搜索窗口;_self:替换本窗口; _top:在顶级窗口里打开;*) //sFeatures=(*channelmode = { yes | no | 1 | 0 };directories = { yes | no | 1 | 0 };fullscreen = { yes | no | 1 | 0 };height = number;left = number;location = { yes | no | 1 | 0 };menubar = { yes | no | 1 | 0 };resizable = { yes | no | 1 | 0 };scrollbars = { yes | no | 1 | 0 };status = { yes | no | 1 | 0 };titlebar = { yes | no | 1 | 0 };toolbar = { yes | no | 1 | 0 };top = number;width = number;*) print() //打印当前窗口文档内容 prompt( [sMessage] [, sDefaultValue]) //弹出输入对话框 resizeBy(iX, iY) //以相对方式改变窗口大小 resizeTo(iWidth, iHeight) //以绝对方式改变窗口大小 scroll(iX,iY) 滚动窗口,与scrollTo一样的效果,出于兼容性的考虑保留下来的方法 scrollBy(iX, iY) //用相对方式滚动窗口 scrollTo(iX, iY) //用绝对方式滚动窗口 setActive() //激活目标而不将视线转向目标 setInterval(vCode, iMilliSeconds [, sLanguage]) //定时执行一段代码 setTimeout(vCode, iMilliSeconds, sLanguage) //延时执行一段代码 showHelp(sURL [, vContextID]) //打开一个帮助文件,sURL为帮助文档地址,vContextID为帮助索引号 showModalDialog(sURL [, vArguments] [, sFeatures]) showModalDialog(sURL [, vArguments] [, sFeatures]) //打开一个模式对话框 //vArguments=需要向新开模式对话框传递的参数 //sFeatures=(*dialogHeight:sHeight;dialogLeft:sXPos;dialogTop:sYPos;dialogWidth:sWidth; center:{ yes | no | 1 | 0 | on | off };dialogHide:{ yes | no | 1 | 0 | on | off };edge:{ sunken | raised }; help:{ yes | no | 1 | 0 | on | off };resizable:{ yes | no | 1 | 0 | on | off };scroll:{ yes | no | 1 | 0 | on | off };status:{ yes | no | 1 | 0 | on | off };unadorned:{ yes | no | 1 | 0 | on | off };*) showModelessDialog(sURL [, vArguments] [, sFeatures]) //打开一个非模式对话框 //vArgument=需要向新开模式对话框传递的参数 //sFeatures=(*dialogHeight:sHeight;dialogLeft:sXPos;dialogTop:sYPos;dialogWidth:sWidth; center:{ yes | no | 1 | 0 | on | off };dialogHide:{ yes | no | 1 | 0 | on | off };edge:{ sunken | raised }; help:{ yes | no | 1 | 0 | on | off };resizable:{ yes | no | 1 | 0 | on | off };scroll:{ yes | no | 1 | 0 | on | off };status:{ yes | no | 1 | 0 | on | off };unadorned:{ yes | no | 1 | 0 | on | off };*) ie里window的method列表 alert(sMsg) //弹出一个确认消息框 attachEvent(sEvent,pFunction) //绑定一个函数到某个事件,事件触发时随机执行其中一个被绑定的函数 blur() //令窗口丧失焦点 clearInterval(iIntervalID) //清除指定定时器的关联函数 clearTimeout(iTimeoutID) //清除指定延时器的关联函数 close() //关闭窗口,如果窗口不是用脚本打开的,会弹出确认对话框。 confirm([sMessage]) //弹出“确定/取消”对话框 createPopup([vArgs]) //创建一个隐藏的弹出式窗口,vArgs是未来考虑提供的参数,返回窗口句柄 detachEvent(sEvent,pFunction) //取消一个事件的某个绑定函数 execScript(sExpression, sLanguage) //用指定的语言执行代码 focus() //激活窗口 moveBy(iX,iY) //用相对方式移动窗口 moveTo(iLeft,iTop) //用绝对方式移动窗口 navigate(sURL) //转到指定的连接 open( [sURL] [, sName] [, sFeatures] [, bReplace]) //打开新窗口,并返回窗口句柄 //sName=(*_blank:打开一个新的未命名窗口;_parent:在父窗口中打开;_search:同时打开搜索窗口;_self:替换本窗口; _top:在顶级窗口里打开;*) //sFeatures=(*channelmode = { yes | no | 1 | 0 };directories = { yes | no | 1 | 0 };fullscreen = { yes | no | 1 | 0 }; height = number;left = number;location = { yes | no | 1 | 0 };menubar = { yes | no | 1 | 0 }; resizable = { yes | no | 1 | 0 };scrollbars = { yes | no | 1 | 0 };status = { yes | no | 1 | 0 }; titlebar = { yes | no | 1 | 0 };toolbar = { yes | no | 1 | 0 };top = number;width = number;*) print() //打印当前窗口文档内容 prompt( [sMessage] [, sDefaultValue]) //弹出输入对话框 resizeBy(iX, iY) //以相对方式改变窗口大小 resizeTo(iWidth, iHeight) //以绝对方式改变窗口大小 scroll(iX,iY) 滚动窗口,与scrollTo一样的效果,出于兼容性的考虑保留下来的方法 scrollBy(iX, iY) //用相对方式滚动窗口 scrollTo(iX, iY) //用绝对方式滚动窗口 setActive() //激活目标而不将视线转向目标 setInterval(vCode, iMilliSeconds [, sLanguage]) //定时执行一段代码 setTimeout(vCode, iMilliSeconds, sLanguage) //延时执行一段代码 showHelp(sURL [, vContextID]) //打开一个帮助文件,sURL为帮助文档地址,vContextID为帮助索引号 showModalDialog(sURL [, vArguments] [, sFeatures]) showModalDialog(sURL [, vArguments] [, sFeatures]) //打开一个模式对话框 //vArguments=需要向新开模式对话框传递的参数 //sFeatures=(*dialogHeight:sHeight;dialogLeft:sXPos;dialogTop:sYPos;dialogWidth:sWidth; center:{ yes | no | 1 | 0 | on | off };dialogHide:{ yes | no | 1 | 0 | on | off };edge:{ sunken | raised }; help:{ yes | no | 1 | 0 | on | off };resizable:{ yes | no | 1 | 0 | on | off };scroll:{ yes | no | 1 | 0 | on | off };status:{ yes | no | 1 | 0 | on | off };unadorned:{ yes | no | 1 | 0 | on | off };*) showModelessDialog(sURL [, vArguments] [, sFeatures]) //打开一个非模式对话框 //vArgument=需要向新开模式对话框传递的参数 //sFeatures=(*dialogHeight:sHeight;dialogLeft:sXPos;dialogTop:sYPos;dialogWidth:sWidth; center:{ yes | no | 1 | 0 | on | off };dialogHide:{ yes | no | 1 | 0 | on | off };edge:{ sunken | raised }; help:{ yes | no | 1 | 0 | on | off };resizable:{ yes | no | 1 | 0 | on | off };scroll:{ yes | no | 1 | 0 | on | off };status:{ yes | no | 1 | 0 | on | off };unadorned:{ yes | no | 1 | 0 | on | off };*) |
|
snoke @ 2007-03-22 17:40 <div style="overflow:auto; width:98%; height:56px; line-height: 15px; border-width:1px; border-color:#696969; border-style:dotted; scrollbar-base-color: Aquamarine; scrollbar-face-color: AliceBlue; scrollbar-track-color: Aquamarine; scrollbar-arrow-color: Aqua; scrollbar-3dlight-color: ; scrollbar-darkshadow-color: ; scrollbar-highlight-color: ; scrollbar-shadow-color: "> <!--overflow设置下拉框样式[auto, scroll,hidden等, 选择scroll会强行显示横向滚动条, 在此情形下添加overflow-x:hidden;则会取消横向滚动条], width设置区域宽度, height设置区域高度, line-height设置行间距, scrollbar-track-color等属性后面为颜色值[颜色名称,#FF6600, rgb(200,100,200)等均可], border-style为边框样式[dotted点状, solid线性等], 请复制到Windows Live Spaces RTE的HTML模式下自行修改--> <br/> <div> 滚动条样式生成器<br/> 这里输入文字 - Enjoy! - Belem<br/> 在下方选择滚动条的不同样式.<br/> 在下方选择滚动条的不同样式.<br/> 在下方选择滚动条的不同样式.<br/> 本工具主要生成滚动条的样式, 文字换行请在相应的地方使用br,p或者line-height样式属性. <br/><br/> </div> </div> |
浙公网安备 33010602011771号