<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Document</title>
<script language="javascript">
alert(document.parentWindow==window)
var oPopup=window.createPopup();
var oPopbody=oPopup.document.body;
oPopbody.style.border ="solid black 1px";
oPopbody.style.backgroundColor="#FFFFCF";
var WorkerName = new Array("克林顿","黄继光","司马迁","撒切尔");
var strHTML="<table style='width:100%; height:100%;font-size:12px;' border=0 cellpadding=0 cellspacing=0>";
for(var i=0;i<WorkerName.length;i++)
strHTML+='<tr height="20" onmouseover="parent.selectRow(this)" onclick="parent.rowClk(this)"><td align="left">'+WorkerName[i]+'</td></tr>'
strHTML+='</table>';
oPopbody.innerHTML=strHTML;
function ShowList(){
var txtObj=document.all.txtSource;
oPopup.show(0,20,txtObj.clientWidth,WorkerName.length*20,txtObj);
}var curRow=null;
function selectRow(src){ 
if (curRow){ curRow.style.backgroundColor="#FFFFCF";curRow.style.color="black";}
src.style.backgroundColor="blue";
src.style.color="white";
curRow=src;
}
function rowClk(src){ 
var txtObj=document.all.txtSource;
txtObj.value=src.innerText;
oPopup.hide();
}</script>
</head><body>
<input id="txtSource" type="text" value="" style="width:200 ">
<input type="button" value="显示人员名单" onclick="ShowList()"></div>
</body>
</html>