日期:2014-05-16  浏览次数:20354 次

window.createPopup对象的问题,在线等啊
<!DOCTYPE   HTML   PUBLIC   "-//W3C//DTD   HTML   4.0   Transitional//EN ">
<HTML>
<HEAD>
<TITLE>   New   Document   </TITLE>
<META   NAME= "Generator "   CONTENT= "EditPlus ">
<META   NAME= "Author "   CONTENT= " ">
<META   NAME= "Keywords "   CONTENT= " ">
<META   NAME= "Description "   CONTENT= " ">
</HEAD>

<BODY>
<SCRIPT   LANGUAGE= "JavaScript ">
<!--
var   vx=document.createDocumentFragment();
c_table=document.createElement( " <input   type=button> ");
vx.appendChild(c_table);
document.body.appendChild(vx);//当前页面可以

var   oPopup   =   window.createPopup();
var   oPopupBody   =   oPopup.document.body;
/*
oPopup.document.appendChild(vx);//这个不行啊!
oPopupBody.appendChild(vx);//这个也不行啊!
*/
oPopupBody.innerHTML   =   " <div> </div> ";
alert(oPopupBody.childNodes(0).tagName);//div取到了!
oPopupBody.childNodes(0).appendChild(vx);//最后这样也不行!

//-->
</SCRIPT>
</BODY>
</HTML>
Popup对象   难道不支持appendChild!达人啊!指点下

------解决方案--------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN ">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME= "Generator " CONTENT= "EditPlus ">
<META NAME= "Author " CONTENT= " ">
<META NAME= "Keywords " CONTENT= " ">
<META NAME= "Description " CONTENT= " ">
</HEAD>

<BODY>
<SCRIPT LANGUAGE= "JavaScript ">
<!--
var vx=document.createDocumentFragment();
c_table=document.createElement( " <input type=button> ");
vx.appendChild(c_table);
document.body.appendChild(vx);//当前页面可以

var oPopup = window.createPopup();
var oPopupBody = oPopup.document.body;
oPopupBody.style.border = "1px solid red ";
oPopupBody.innerHTML = " <div> </div> ";
alert(oPopupBody.childNodes(0).tagName);//div取到了!
var vx2 = oPopup.document.createElement( " <input type=button> ");
oPopupBody.appendChild(vx2);//最后这样也不行!
oPopup.show(100,100,100,100,document.body);
//-->
</SCRIPT>
</BODY>
</HTML>