我正在尝试从html文件中抓取mailto(href),但是我无法“点击”它。
欢迎任何建议。
{ li: "...." }
代码:
<div class="exhibitor-contact">
<div class="col">
<h3>
whatever </h3>
<p>
MLW <br /> whatever<br /> 75008 Paris - France </p>
<p>
<a class='inverse-a-span' href='#tel' id='tel' onclick="return xt_click(this,'C', xtn2, xtpage.replace(/\w*$/, 'exhibitor::tel').replace(/^Exhibitors::/, ''), 'A')">Show Phone Number</a><span style='display:none;'>whatever</span><br /> <a href='mailto:whatever@whatever.com' onclick="return xt_click(this,'C',xtn2, xtpage.replace(/\w*$/, 'exhibitor::email').replace(/^Exhibitors::/, ''), 'A')">Send an Email</a><br /> </p>
</div>
</div>
</section>
答案 0 :(得分:0)
使用css属性=值选择器,且^以运算符开头
Debug.Print ie.document.querySelector("[href^='mailto:']").href