如何select-option提交后无刷新,为选中时的值
<script language="javascript">function selectlang(){
var strval=$("#sel ").val();
windows.location="Language/chooseLanguage/" +strval.tostring();
}
</script>
<select id ="sel" name="sel" onchange="selectlang()">
<option value="0">English</option>
<option value="1" selected="selected" >中文</option>
</select>
.....
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Mvc;
using System.Threading;
using CommonUtil;
namespace ApplicationExpertShare.Controllers
{
public class LanguageController : Controller
{
//
// GET: /English/
public ActionResult chooseLanguage(string strval)
{
System.Globalization.CultureInfo languageCulture;
if (strval=="0"){
languageCulture= new System.Globalization.CultureInfo("en-US");
}else{
languageCulture= new System.Globalization.CultureInfo("zh-cn");
}
Session["Culture"] = languageCulture;
return this.Redirect(this.Request.UrlReferrer.ToString());
}
}
}
怎么实现调chooseLanguage操作方法后,select中的值为选中时的值,而不是每次都刷新成初始值啊
多谢! JavaScript --------------------编程问答-------------------- 请高手指教。。。。
补充:.NET技术 , .NET技术前瞻