设为首页
加入收藏
联系站长
您现在的位置: 网贝 >> 建站学院 >> 网页设计 >> JavaScript >> 文章正文 用户登录 新用户注册
JScript 客户端 Request 对象         ★★★★
JScript 客户端 Request 对象
相关网站:
作者:佚名 文章来源:网贝整理 点击数: 更新时间:2005-4-14

var Request =
{
QueryString: new ThunderBirdRequestQueryString(),
Cookies: new ThunderBirdRequestCookies()
}
function ThunderBirdRequestQueryString()
{
this.Current = document.location.search;
this.count = 0;
this.Item = new Array();
this.item = function (strKey)
{
  if ( typeof(this.Item[strKey]) != "undefined" )
  {
   return this.Item[strKey];
  }
  else
  {
   return "";
  }
}
ThunderBirdRequestOnInit(/([^?&][a-z\d]*)=([^#&]*)/gim, this.Current, this.count, this.Item);
}
function ThunderBirdRequestCookies()
{
this.Current = document.cookie;
this.count = 0;
this.Item = new Array();
this.item = function (strKey)
{
  if ( typeof(this.Item[strKey]) != "undefined" )
  {
   return this.Item[strKey];
  }
  else
  {
   return "";
  }
}
ThunderBirdRequestOnInit(/([^?&][a-z\d]*)=([^#&;]*)/gim, this.Current, this.count, this.Item);
}
function ThunderBirdRequestOnInit(RegExpRule, Current, count, Item)
{
if ( Current != "" )
{
  while ( RegExpRule.exec(Current) != null )
  {
   Item[RegExp.$1] = RegExp.$2;
   Item[count] = RegExp.$2;
   count += 1;
  }
}
}

几经修改 才出来这个

用过 Scripting.Dictionary 也用过 类型属性 最后还是用回 数组

使用方法

document.write( Request.QueryString.item("test") );

文章录入:admin    责任编辑:admin 
  • 上一篇文章:

  • 下一篇文章:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    相关网站:

    文章 下载 图片
    普通文章[组图]随机显示广告
    普通文章随机广告代码全集
    普通文章实现在新窗口中打开
    普通文章延迟/定时/强制弹出
    推荐文章对联广告代码大全
    普通文章用js绘图
    普通文章JScript 客户端 Req
    普通文章只能限制输入中文的
    推荐文章对联广告代码大全
    推荐文章可设置同一IP弹出窗
    推荐文章[组图]JavaScript教
    推荐文章Slide show 的制作
    推荐文章制作自动关闭的窗口
    推荐文章透明渐变弹出菜单的
    推荐文章玩转花样表单
    普通文章把手教你写私服列表
    普通文章WEB标准
    普通文章GOOGLE sitemap官方
    普通文章用php定制404错误页
    普通文章WAP(wml)开发问答
    普通文章[组图]PS教程系列:快
    普通文章时使用apache和IIS,
    普通文章[组图]2005年的第一
    推荐文章[组图]彻底掌握IIS6
    推荐文章[组图]CSS 全攻略
    推荐文章各种脚本错误详解!
    推荐文章直接生成XML的Googl
    推荐文章九个常见的错误原因
    推荐文章Win XP家用版也能装
    推荐文章JSP入门初级教程之J
    推荐文章ASP入门及提高
    没有相关文章

    让网页适应不同的浏

    JavaScript教程

    下拉菜单全攻略 Jav
    (只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    Copyright © 2003-2005 NetBei.com All rights reserved.