var url=document.getElementById("a001").src; 或var url=document.getElementById("a001").attributes["src"].nodeValue;