Javascript examples for DOM HTML Element:Image
Apply substring on image url
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){// w ww . ja v a 2 s. c om var string = 'url("http://www.java2s.com/style/download.png")'; string = string.substr(0, string.length - 2); string = string.substr(5, string.length); console.log(string); console.log(string); } </script> </head> <body> </body> </html>