<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" style="height: 100%;">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=10">
    <meta http-equiv="Cache-Control" content="no-cache"/>
    <title></title>
    <script language='javascript' src="../source/jquery.js"></script>
    <script type="text/javascript">
    	function openwindow(arg) {
    		document.getElementById('ifmain').contentWindow.SendMsg('openwindow/'+arg);
			}
    </script>
    <style type="text/css">
    body {
        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif, "Microsoft YaHei", "宋体", "Segoe UI", "verdana", "arial";
        background-color: #FFF;
        color: #000000;
        margin-bottom: 0;
        margin-top: 0;
        margin-left: 0;
        margin-right: 0;
        font-size: 12px;
    }
    html,body,form{
       height: 100%; 
    }
 </style>
 
</head>
  </head>
  <body style="height:100%">
  	<div>
  		这是一个HTML页面,主要演示HTML与PB嵌入程序间的交互：
  		<input type="button" value="订单" onclick="javascript:openwindow('bill_1');"/>
  		<input type="button" value="报表" onclick="javascript:openwindow('report_1');"/>
		msg:<input id=msg type="text" value="" />
  	</div>
  	  		<br/>
  	<div style="width:100%;height:100%"><iframe id="ifmain" style="width:100%;height:100%"src="../run?action=htmlvdn&Parm=parm-2"></iframe></div>
  	<script type="text/javascript">
		function oper(arg){
			alert("JS接收到:"+arg);
			document.all("msg").value=arg;
		}

  		function onResponse(arg){
                       setTimeout(function(){oper(arg);},100);
  		}
    	document.getElementById('ifmain').contentWindow.onResponse=onResponse;
    </script>
  </body>
</html>