Remove forward slash from URL jquery -


I am trying to delete "/" before the following code

  if ($ (This) .fund ('img'). Length) {var url = New URL ($ (this) .find ('img'). Et ('scom')); $ ("# Ajaximageid") val (url.pathname). }  

I have tried to use

  url.replace ("/", "") but I get an error  

Any help would be appreciated I have tested the url object and found that you can not delete / i

< Div class = "post-text" itemprop = "text" .

If you do url.pathname = 'test', then , the path is named / test .

What you can do when you use it, you cut the first letter:

  $ ("#jjaximageid"). Val (url.pathname.slice (1));  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -