return the element from a 'a' tag?
why does this not return the element? it returns the href attribute on the tag
var tst = document.body.appendChild(document.createEl开发者_C百科ement('a'));
tst.setAttribute('href', 'http://www.test.com');
alert(tst);
It does return an element..... .nodeType is 1 and .nodeName is A if you actually test it.
Anchor elements' toString method probably just return the url for certain DOM implementations.
加载中,请稍侯......
精彩评论