Get the value of a textbox using javascript sample code: <!DOCTYPE html> <html> <head> <script> // access the value of
Tag: JavaScript Interview Questions
How to add JavaScript inside a web page?
There are mainly two ways from which we can add javascript inside web page as follows: A) Inside <head> tag.
replace method in javascript
Replace method in javascript The JavaScript replace() method searches a string for a specified value, or a regular expression, and
JavaScript lastIndexOf() Method
The JavaScript lastIndexOf() method returns the position of the last occurrence of a specified value in a string. Syntax: string.lastIndexOf(searchvalue,start)
JavaScript indexOf() Method
JavaScript indexof method The indexOf() method returns the position of the first occurrence of a specified value in a string.
JavaScript concat() Method
The JavaScript concat method is used to join two or more strings. Syntax: string.concat(string1, string2, …, stri ng N) Example
JavaScript String Methods
JavaScript String Methods Description charAt() Returns the character at the specified index charCodeAt() Returns the Unicode of the character at
JavaScript charCodeAt() Method
The JavaScript charCodeAt() method returns the Unicode of the character at the specified index in a string. The index of
this keyword in JavaScript
this keyword in JavaScript is important concept, which is used in object methods. The this keyword is used to call
JavaScript charAt method
The javascript charat method returns the character at the specified index in a string. The index of the first character is
JavaScript Special Characters
JavaScript special characters can be added using backslash() character The backslash () can be used to insert apostrophes, new lines,
Remove html element using javascript
To remove html element using javascript, you need to find first parent and then find the child which you want