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
WBOYOriginal
2016-05-16 17:45:101814browse
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
//
Statement:
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
Previous article:Learn javascript through jQuery source code (2)_jqueryNext article:Learn javascript through jQuery source code (2)_jquery

Related articles

See more