我需要幫助...如何在javascript中設置會話值?
var languageID = document.getElementById('drpLanguage').value;
//alert(languageID);
if (languageID == "1") {
<%Session["languageIDD"] = "1";%>
} else if (languageID == "3") {
alert("5");
<%Session["languageIDD"] = "2";%>
} else {
<%Session["languageIDD"] = "3";%>
}
<% Session["languageIDD"] = "'+languageID+'"; %>
window.location = "Default.aspx";
這個代碼不正確works.Because,LanguageID = 3。
幫助我....
ASP.NET無法識別Javascript。你不能混用這兩個代碼。 –
用ajax做它.. – karaxuna