Javascript get last characters from a URL or string

0

How can I get last two characters or specific characters from a url or given string.If you have basic knowledge of javascript substring this is easy job.

First of all, look at this example.Then you can understand this better.

javascript get last characters from a string or url

Get specific characters from a url

How can you get url parameters from url?

Get specific characters from a given string or text.

If you want to get last two characters from a string, you can get it like following example.

Following example is describes how is the behavior of sub string.This is get start from 2nd letter(here “a”) with get number of three characters.

Easy method

Share.

About Author

Sumith Harshan is the Web Engineer Specializes in Java Script, JQuery, HTML4/5, CSS2/3, PHP, CodeIgniter, CakePHP, J2SE, J2EE, XML, Hacking & Security, Mobile Interface Developing, Magento, Wordpress, Joomla, Drupal,PHPBB,Facebook App Developing and Open cart...etc.