Javascript examples for String:substring
Find a sub string using search() function
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*www . java2 s.c om*/ var url = 'http://localhost:3000/interests'; var url1 = 'http://localhost:3000/ideas'; console.log(url.search('interests')); } </script> </head> <body> </body> </html>