Posted in Javascript onDecember 28, 2012
首先,html代码:
<div style="display:none;"><iframe id="compareIframe" src=""></iframe></div>
js代码:
var compareContent=”你要改变的值"; if (compareContent != "") { document.getElementById("compareIframe").src = "ajax/changeSession.aspx?compareInfo=" +compareContent; } ajax: changeSession.aspx.cs protected void Page_Load(object sender, EventArgs e) { Session["compare"] = Request.QueryString["compareInfo"]; } //end //<a href=”http://www.cnblogs.com/wuchao/”></a>
前台js改变Session的值(用ajax实现)
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@