改变asp.net光标 [英] Changing the cursor in asp.net
本文介绍了改变asp.net光标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想改变光标为沙漏在我的asp.net应用程序,让我的用户知道这个过程正在运行。我搜索了答案,被告知如下使用JavaScript。
I want to change the cursor to an hourglass in my asp.net application to let my users know that the process is running. I searched for an answer and was advised to use javascript as follows.
1)添加这个JavaScript
1) Add this javascript
function hourglass() {
document.body.style.cursor = "wait";
}
2),然后在页面加载事件我的code:
2) then in my code in the page load event:
btnImport.Attributes.Add("onclick", "javascript: hourglass();");
在btnImport是按钮,他们点击
When btnImport is the button they click on
然而,这是行不通的。但是,如果我添加提醒沙漏功能。它的工作。是否有某种方式得到这个没有戒备工作。
However this does not work. But if I add an alert to the hourglass function. it does work. Is there some way to get this to work without the alert.
先谢谢了。
鲍勃阿瓦洛
推荐答案
这个怎么样:
btnImport.Attributes.Add("onclick", "hourglass();");
这篇关于改变asp.net光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文