更改代码后面的游标和/或jQuery?

时间:2013-10-30 19:59:41

标签: jquery asp.net cursor

如何使用jQuery将光标更改为“等待”,然后在代码隐藏中恢复为默认值?

代码的前两行可以自行工作(如果我删除其余的代码)。如果我只添加//here I call stored procedure, pass parameters to a class function, which writes excel file and sends it with httpresponse的其余代码,则不会调用JavaScript函数。

protected void PACR_btnclick(object sender, ImageClickEventArgs e)        
{
    string myScript = "cursorWait();";
    ScriptManager.RegisterStartupScript(this, this.GetType(), "RegisterStartupScript", myScript, true);

        //here I call stored procedure, pass parameters to a class function, which writes excel file and sends it with httpresponse

    string myScript = "cursorDefault();";
    ScriptManager.RegisterStartupScript(this, this.GetType(), "RegisterStartupScript", myScript, true);
}

的javascript:

function cursorWait() {
    $("body").css("cursor", "progress");
    alert("progress");
 }
 function cursorDefault() {
     alert("default");
    $("body").css("cursor", "default");
    return false;
 }

0 个答案:

没有答案