0 votes
in JavaScript by
How to set the cursor to wait in Javascript?

1 Answer

0 votes
by

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.

function myFunction() {
  window.document.body.style.cursor = "wait";
}

and this function invoked on page load

<body onload="myFunction()"></body>
...