jQuery is a very powerful javascript library that We use all the time. It’s simple to use, yet easy enough to do very advanced things. Anyone who has used jQuery knows that you can do quite a lot with selectors. One of the caveats that I found is using a selector for a DOM element that contains special characters.

Read More

Many times we face the problem of getting all the form controls or elements values of a long form. Because sometime getting so many controls by their id or name is very typical that make a long list.
So we need to opt a short way for getting all element values using jQuery. I have described three ways in this article.

Read More

check for existence of a substring into a string is a common requirement for programmers. Here I’m describing 3 functions to check if string contains specific words.

  • strpos – Find the position of the first occurrence of a substring in a string.
  • strstr – Find the first occurrence of a string
  • preg_match – Perform a regular expression match

Read More

The substr() method returns the characters in a string beginning at the specified location through the specified number of characters. Syntax, parameters, examples of substr() in Javascript are as below.

Read More

substring() is one of the main string function which is mostly used in javascript. The substring() method extracts the characters from a string, between two specified indices, and returns the new sub string.

Read More

[ Page 1 of 2 ]