Easy learning with example program codes

how to handle exceptions in javascript?

JavaScript latest version added exception handling capabilities. It provides try, catch and finally blocks to handle the exceptions.

Syntax of try block with catch block:



Read More

how to redirect a url using javascript?

We can use window.location.replace(…) or window.location.href to redirect a url using javascript.

//Behave as an HTTP redirect

//Behave as clicking on a link
window.location.href = "";
Read More

how to read a cookie using javascript?

JavaScript can create, read, and delete cookies with the document.cookie property.


document.cookie = "key1 = value1; key2 = value2; expires = date";

expires: is an … Read More

Copyright © 2019 CodesJava Protection Status SiteMap Reference: Java Wiki