JS 链接节点的问题

 

 

这其中对一个链接点的操作:

 

oA.innerText = "www.my.com";

oA.href = "www.other.com";

 

然后结果 oA.innerText 自动变为 www.other.com

如果 oA.href 不是 www开头, 或者 oA.innerText不是 www开头, 就不会有这种情况.

 

oA.href = "www.other.com";

oA.innerText = "www.my.com";

就没有问题了.

 

很奇怪!

posted on 2009-01-22 00:42  norsd  阅读(119)  评论(0编辑  收藏  举报

导航