请求帮助

foreverzifan 2017-10-30 05:06:12

用WebBrowser2加载的页面,但是取不到红色枉中的源码,是异步加载的。网面源代码如下:


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>订货通知单打印</title>
<link href="../../css/main.css" rel="stylesheet" type="text/css"></link>
<link href="../../AW/runtime/styles/xp/aw.css" rel="stylesheet" type="text/css"></link>
<script language="javascript" src="../../AW/runtime/lib/aw.js"> </script>
<script language="javascript" src="../../js/common.js"> </script>

<script>
var sheetid = getQuery("sheetid");
var buid = getQuery("buid");
var format_show_xsl = "../../xsl/0/format4purchase4print4scm.xsl";
var sheetcount = 0;
window.onload = function(){
var arr_sheetid = sheetid.split(",");
var arr_buid = buid.split(",");
sheetcount = arr_sheetid.length;
for( var i=0; i<sheetcount;i++ ){
load(arr_sheetid[i],i,arr_buid[i]);
}
};

function load(sheetid,i,buid)
{
var url = "../../DaemonMain?operation=show&service=Purchase&sheetid=" + sheetid+"&buid=" + buid;
var table4detail = new AW.XML.Table;
table4detail.setURL( url );
table4detail.request();
table4detail.response = function(text){
setLoading(false);
table4detail.setXML(text);
if(buid=='19'){
format_show_xsl = "../../xsl/0/"+buid+"/format4purchase4print4scm.xsl";
}

var node_row_checkLotSave = table4detail.getXMLText( "xdoc/xout/sheet/checkLotDataSave" );
if(node_row_checkLotSave=="true" && buid != '19'){
format_show_xsl = "../../xsl/0/format4purchase4lotdata4print4scm.xsl";
}

var html = table4detail.transformNode( format_show_xsl );
//站点2增加分页符号
var site = 0;
if(site==2 && i<(sheetcount-1)){
html += "<div style='page-break-after:right'></div>";
}
var elm_sheet = document.createElement("div");
elm_sheet.innerHTML = html;
document.body.appendChild( elm_sheet );
};
setLoading(true);
}

</script>
</head>
<body>
<div id="div_detail" >
</div>
</body>
</html>

在WebBrowser2.document.body里不管是innerhtml还是outhtml都取不到真实源代码。要怎么才能得整页的源代码。
...全文
261 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
赵4老师 2017-10-31
  • 打赏
  • 举报
回复
等待异步加载完成事件 ?
threenewbee 2017-10-31
  • 打赏
  • 举报
回复
还取不到看看是不是框架网页
threenewbee 2017-10-31
  • 打赏
  • 举报
回复
定时器等待加载完应该可以取到

7,762

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧