The cursor can be set to wait in JavaScript by using the property "cursor". The following example illustrates the usage: