JAVASCRIPT ASP Cookie str 长度的问题
在一下A.ASP中
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="936"%>
<%
var w;
w = Request.Cookies("name");
Response.Write("w=" + w + " " + " len=" + w.length + "<br>");
%>
页面上看到的结果是
"w=b1 len=undefined"
怎样获得w字符串的长度
------解决方案--------------------var len
------解决方案--------------------<%
var w;
w = Request.Cookies( "name ").toString();
var len = w.length;
Response.Write( "w= "+w+ " len2= "+len+ " <br> ");
%>