Home > Web Front-end > JS Tutorial > Front-end js changes the value of Session (implemented with ajax)_javascript skills

Front-end js changes the value of Session (implemented with ajax)_javascript skills

WBOY
Release: 2016-05-16 17:45:10
Original
1784 people have browsed it
First, the html code :
Copy the code The code is as follows:

< ;div style="display:none;">


js code :
Copy code The code is as follows:

var compareContent=”What you want to change value";
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
//
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template