还有一个问题
protected void UpdatePanel4_Init(object sender, EventArgs e)
{
if (this.Request.Cookies["focusTextBox"] != null)
{
string s = this.Request.Cookies["focusTextBox"].Value;
string script =
"var inp = $get('" + s + "');" +
"window.setTimeout('var r = inp.createTextRange();r.collapse(false);r.select();', 10);";
ScriptManager.RegisterStartupScript(this.UpdatePanel4, this.Page.GetType(), "ScriptBlock", script, true);
}
}是否清除cookies,此代码就无效了?现在的目的是,让JS函数和这串代码都无效!
protected void UpdatePanel4_Init(object sender, EventArgs e)
{
if (this.Request.Cookies["focusTextBox"] != null)
{
string s = this.Request.Cookies["focusTextBox"].Value;
string script =
"var inp = $get('" + s + "');" +
"window.setTimeout('var r = inp.createTextRange();r.collapse(false);r.select();', 10);";
ScriptManager.RegisterStartupScript(this.UpdatePanel4, this.Page.GetType(), "ScriptBlock", script, true);
}
}是否清除cookies,此代码就无效了?现在的目的是,让JS函数和这串代码都无效!
http://blog.csdn.net/greatverve/archive/2008/12/23/3588353.aspx