Tuesday, February 2, 2010

How to set the cursor to wait in JavaScript?

The cursor can set to wait in JavaScript by using the property ‘cursor’ property. The following example illustrates the usage.
window.document.body.style.cursor = "wait"; // sets the cursor shape to hour-glass.

How to set the cursor to wait in JavaScript?



A moue over this yellow patch will show you the wait cursor.


What is decodeURI(), encodeURI() in JavaScript?

To send the characters that can not be specified in a URL should be converted into their equivalent hex encoding. To perform this task the methods encodeURI() and decodeURI() are used.
For example, the following code snippet performs the encoding of URL:

What is decodeURI(), encodeURI() in JavaScript?

These functions are used to encode and decode the URIs.
Eg:
String: Career Ride
Operation: encodeURI()
Output: Career%20Ride
Operation: decodeURI()
Output: Career Ride

0 Comments: