1
自动化JavaScript表单我有类似这样的一个问题:在Internet Explorer中使用VBA
Automating Java Applet from IE and VBA
它一直无人接听,为的是尚未。
我想在degreedays.net的首页上自动填写表格。
我正在使用VBA,因此我可以轻松地将我的自动化/抓取与excel进行整合。
我认为网页的相关源代码是:
<h2 class="popout">Degree Days.net</h2>
<div id="formSlot">
<div class="formLoading">
<script type="text/javascript">
// <![CDATA[
document.write('<p><img src="template/loading-small.gif" width="16" height="16"/><span class="loadingText">Loading...</span></p>');
// ]]>
</script>
<noscript>
<p class="noJavaScript">To use Degree Days.net, your browser must have JavaScript enabled. This should only require a very simple change to your browser settings.</p>
</noscript>
</div>
</div>
但我没有使用典型的VBA的形式的方式,例如:
ie.document.getElementById(" ").value= " "
因为没有<input>
或<option>
标签可见我。
我该怎么做呢?任何想法,将不胜感激。
我相信你可以使用外部驱动,如imacros或selenium – dm03514
当你使用“查看源代码”时,你正在查看从服务器传递的页面源代码:在这种情况下,你需要使用IE开发工具查看“呈现”来源。然后你会看到你正在寻找的表单元素。 –
谢谢@TimWilliams! – Nick