JavaScript & V8 Internals (536 Qs)•Part 5: ES6+ Modern Syntax, Classes, Modules & Destructuring (254 - 328)
How to set the cursor to wait
mid LevelCode ExamplejavascriptES6+ Modern Syntax
The cursor can be set to wait in JavaScript by using the property cursor. Let's perform this behavior on page load using the below function.
javascript
function myFunction() {
window.document.body.style.cursor = "wait";
}
and this function invoked on page load
html
<body onload="myFunction()"></body>