【发布时间】:2014-02-27 16:44:06
【问题描述】:
我想为 WP8 创建一个显示网页内容的应用程序。我还没有编写代码,但我知道我可以使用 xpath 获取页面内容。我的问题是我要获取的内容不在单个页面中。我必须按“下一步”按钮才能转到下一页。按钮的代码是这样的。
<td class="pager-next" style="padding:0;margin:0;">
<a id="ctl00_ContentPlaceHolder1_LinkButton2" class="buttondiego buttondiego_small buttondiego_arrow" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$LinkButton2','')"></a>
</td>
这是头文件中的JS函数:
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['aspnetForm'];
if (!theForm) {
theForm = document.aspnetForm;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
是否可以使用我的代码转到下一页?我该怎么办?
【问题讨论】:
-
您至少应该发布表单的代码,并且指向该页面的链接不会受到伤害。
标签: c# javascript html xpath windows-phone-8