I am trying to remove the ?
character from all anchor href
values with Javascript. For example, there are many URLs like this:
<a href="https://example.com/something/?">my anchor</a>
I tried this but getting the error index of is not a function
var url = jQuery("a");
var a = url.indexOf("?");
var b = url.substring(a);
var c = url.replace(b,"");
url = c;