KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Consider the following Javascript: var anchors = document.getElementsByTagName('a'); for(var i=0; i < anchors.length; i++) { alert(a.pathname); } When I run this on a page that contains links in the format " http://foo.com/bar ", in IE8 I get back a string that looks like "bar". In Safari, Chrome, Firefox, I get back something like "/bar" (note the leading forward slash). Is IE at fault here, what's the deal?
Tags (comma-separated)
Save Edits
Cancel