String.prototype.Trim = function(){ return this.replace(/(^\s*)|(\s*$)/g, "");
IFrame提示-处理:
1<TD align="right" colSpan="2" valign=top><a href='ProductSave.aspx?id=<%# DataBinder.Eval(Container,"DataItem.ProductCode")%>' target="producturl"><img src="../../images/product/pic_3.gif" border=0 ></a></TD>
2
3<IFRAME id="producturl" width="0" height="0" name="producturl" src="" frameBorder="0"
4scrolling="no"></IFRAME>
2
3<IFRAME id="producturl" width="0" height="0" name="producturl" src="" frameBorder="0"
4scrolling="no"></IFRAME>
对Cookie 操作:
1 if(Request.QueryString["id"]!=null&&Request.QueryString["id"].ToString()!="")
2 {
3 string procode = string.Empty ;
4 //获得产品编号
5 procode=Request.QueryString["id"].ToString();
6 string cookiea=string.Empty;
7 //获得本机保存的产品收藏cookie
8 if(Request.Cookies["productcode"]==null)
9 {
10 //写入本机收藏的产品编号cookie
11 Response.Cookies["productcode"].Value=cookiea+"'"+""+procode.ToString()+""+"'"+",";
12 }
13 else
14 {
15 cookiea=Request.Cookies["productcode"].Value;
16 //写入本机收藏的产品编号cookie
17 Response.Cookies["productcode"].Value=cookiea+"'"+""+procode.ToString()+""+"'"+",";
18 }
19
20 //设置本机收藏的产品编号cookie的过期时间
21 Response.Cookies["productcode"].Expires=DateTime.Now.AddDays(30);
22
23 }
24 else{
25 this.ShowMessage("由于系统繁忙或您的浏览器不支持Cookie,请您打开浏览器的Cookie或下次在试!");
26 }
2 {
3 string procode = string.Empty ;
4 //获得产品编号
5 procode=Request.QueryString["id"].ToString();
6 string cookiea=string.Empty;
7 //获得本机保存的产品收藏cookie
8 if(Request.Cookies["productcode"]==null)
9 {
10 //写入本机收藏的产品编号cookie
11 Response.Cookies["productcode"].Value=cookiea+"'"+""+procode.ToString()+""+"'"+",";
12 }
13 else
14 {
15 cookiea=Request.Cookies["productcode"].Value;
16 //写入本机收藏的产品编号cookie
17 Response.Cookies["productcode"].Value=cookiea+"'"+""+procode.ToString()+""+"'"+",";
18 }
19
20 //设置本机收藏的产品编号cookie的过期时间
21 Response.Cookies["productcode"].Expires=DateTime.Now.AddDays(30);
22
23 }
24 else{
25 this.ShowMessage("由于系统繁忙或您的浏览器不支持Cookie,请您打开浏览器的Cookie或下次在试!");
26 }