Category: Javascript

Javascript 0

How to Submit a Form using JavaScript

The easiest way to submit a form using JavaScript is by using HTMLFormElement.submit() method. This method does something similar to activating a submit button of the form. If a form control (such as a...

Javascript 0

Scope of variables in JavaScript

What is the scope of variables in Javascript? Scope in javascript refers to the variables and the functions which are accessible and in what context it will be executed. There are basically 2 types of scope...

Javascript 0

Javascript URLEncode

Let us take a look at what would be the best approach for Encoding URL using Javascript. There are basically 3 Javascript URLEncode methods available. Types of Javascript URLEncode escape() will not encode: @*/+...

Javascript 0

How to check if string contains another substring

The easiest way to check if string contains another substring is by using indexOf() Javascript method. The indexOf() method returns the position of the first occurrence of the specified value in a string. If...