How To Validate The Url Using Javascript

Posted by

To split a string by the last dot, you have to first get the index position of the last dot using the lastIndexOf() method.

HTML PART :-

Javascript Code :-