Home Answers Viewqa JavaScriptQuestions How to set the cursor to wait?

 
 


samar
How to set the cursor to wait?
1 Answer(s)      2 years and 7 months ago
Posted in : JavaScript Questions

How to set the cursor to wait?

View Answers

November 10, 2010 at 11:23 AM


We can set the cursor to wait by using following code-

document.body.style.cursor = "wait";

The full code is as-

<body>
<script language="Javascript">
function ChangeCursor() {
    document.body.style.cursor = 'wait';
}
function RestoreCursor() {
    document.body.style.cursor = 'default';
}
</script>
<input type="button" onclick="ChangeCursor()"
value="Change Cursor to wait" />
<input type="button" onclick="RestoreCursor()"
value="Default" />
</body>









Related Pages:

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.