我正在处理 ASPX 页面.. 我的脚本不工作
请在下面找到更新的代码:
<script runat="server">
protected void settxtSymbol(object sender, System.EventArgs e)
{
switch ((Timer1.Interval / 3) % 3)
{
case 0: txtSymbol.Value = "GOOG";
break;
case 1: txtSymbol.Value = "MICR";
break;
case 2: txtSymbol.Value = "YHOO";
break;
}
ScriptManager.RegisterStartupScript(this ,this.GetType(), "script",
"javascript:{var txtSymbol = document.getElementById(\"txtSymbol\");
window.location = \"default.aspx?s=\"" + txtSymbol.Value + ";}", true);
}
</script>
我需要从 settextSymbol 函数调用 SendRequest