Layout Options

  • Fixed Header
    Makes the header top fixed, always visible!
  • Fixed Sidebar
    Makes the sidebar left fixed, always visible!
Function Encode URI

Description

The decodeURI() function is used to decode a URI.

This method has the form:

decodeURI(uri)

Parameter Description
uri (required) The URI to be decoded

Examples

The following example shows the basic use of this method.

<script>
var uri = "ex.com/my test/index.html";
document.write(encodeURI(uri));
document.write("<br />");
document.write(decodeURI(uri));
</script>

This produces the following result:

Browser Support

Firefox IE Chrome Opera Safari

Description

The encodeURI() function is used to encode a URI.

This function encodes special characters, except: , / ? : @ & = + $ # (Use encodeURIComponent() to encode these characters).

This method has the form:

encodeURI(uri)

Parameter Description
uri (required) The URI to be encoded

Examples

The following example shows the basic use of this method.

<script>
var uri = "ex.com/my test/index.html";
document.write(encodeURI(uri));
document.write("<br />");
document.write(decodeURI(uri));
</script>

This produces the following result:

Browser Support

Firefox IE Chrome Opera Safari