Javascript examples for String Operation:String URL
Get the number in url string
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/* www. ja va 2 s . com*/ var myString = "/organizations/1/media/videos/11"; var myArr = myString.split('/'); console.log(myArr[2]); } </script> </head> <body> </body> </html>