English 中文(简体)
《古典》一页:为什么有 t要求?
原标题:Classic asp: why doesn t Request.QueryString("foo").toString() work in a javascript (JScript) based page?

我想做的仅仅是:

  • Get the name-value pairs that were supplied to Request.QueryString
  • Populate a javascript object (aka hash) with keys from the names and values from the values
  • Halt the page if one of the expected hash values is the empty string

请求。 崇高目标正提醒我,我为什么甚至在被放弃的技术之前就仇视古典雕。

最佳回答

证据内容按默认即为证据处理。

但如果必须的话,你可以始终执行 String( request.querystring("foo") );

钥匙是事先知道的吗? 或者,你希望通过奶制品回收,并收回关键和价值?

问题回答

请求。 彩色收集具有宽松的接口,特别是在采集方面,或者在有多个带有相同名称的寄生虫的情况下。 我建议利用请求宽恕整个询问。 QueryString.Item()或请求。 服务器可操作(查询:软件),并使用令人不安的替罪羊/编码加以分类。 这是一项努力,但赋予了你们更大的控制和一致性。

降低关键因素的简单例子:

var params = parseQueryString(Request.QueryString.Item());

function parseQueryString(qs) {
  var parsed = {}, pairs = qs.split( & );
  for (var i = 0; i < pairs.length; i ++) {
    var pair = pairs[i], pos = pair.indexOf( = );
    if (pos < 0) pos = pair.length;
    parsed[unescape(pair.slice(0, pos)).toLowerCase()] = unescape(pair.slice(pos + 1));
  }
  return parsed;
}




相关问题
How to import excel file in web page useing Classic ASP?

We are trying to open an existing excel file (2003) from server location in a web page and save it again in the same location using following syntax. Set ExcelReportApp = CreateObject("Excel....

What s the best method to do paging in my ASP page

What s the best method to do paging in my ASP page when displaying a list of items? I knew that there is no equivalent to MySQL s LIMIT clause present in SQL Server, either 2000 or 2005. How can I ...

Using Classes in a Dictionary in Classic ASP

I usually do C# but have inherited a classic ASP project. I have defined a class: Class clsPayment Public Name End Class Set objPayment = New clsPayment objPayment.Name = "...

Response.Redirect HTTP status code

Why is it that ASP/ASP.NET Response.Redirect uses a HTTP-302 status code ("Moved Temporarily") even though in most cases a HTTP-301 status code ("Moved Permanently") would be more appropriate?

form inside form serialize problem

I am trying to submit a form inside another form because I will need first form s outcome in the second form. I tried using form serialize as advised in some other threads. Problem here is, I dont ...

热门标签