JavaScript Internals (521 Qs)•Part 5: ES6+ Modern Syntax, Classes, Modules & Destructuring (254 - 328)
How to set the cursor to wait
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>