String.substr
Posted: Sun Mar 20, 2005 4:40 pm
Ok, this javascript gives me truoble.
I tried to get 3rd-10th character of the href.
HOwever everytime z is the full url. substr() never worked.
Code: Select all
javascript:var theTags = document.getElementsByTagName('a'); for (x=0;x<1;x++) {y=theTagsїx].href;var z=y.substr('2,8');alert(z); } void 0;HOwever everytime z is the full url. substr() never worked.