</head>
<body>
<h1>Welcome to My Homepage</h1>
<div id="details_readonly">
To see Carnaval history: <a
href="http://carnaval.amazon.com/v1/viewHistory.do?type=monitor&name=PyOP.EU.MPQS.Prod.OneBox.RequestError">http://carnaval.amazon.com/v1/viewHistory.do?type=monitor&name=PyOP.EU.MPQS...</a>
To see Carnaval snapshot: <a
href="http://carnaval.amazon.com/v1/viewSnapshot.do?timestamp=2018-05-17+22%3A40%3A34.475&name=PyOP.EU.MPQS.Prod.OneBox.RequestError">http://carnaval.amazon.com/v1/viewSnapshot.do?timestamp=2018-05-17+22%3A40%...</a>
</div>
</body>
</html>
我可以使用
访问此页面的hrefvar oLink = document.getElementById('details_readonly').getElementsByTagName("a");
var i, len = oLink.length;
for( i = 0; i < len; i++ ) {
var li= oLink[i].getAttribute('href');
if(oLink[i].innerHTML.indexOf("viewSnapshot.do") != -1 ) {
//...get document of the link
}
}
但是,现在我想访问在链接的“//...get文档”中标识的链接的文档(以及随后的hrefs)?
是否可以使用javascript,如果是的话?