这个方法的CallFun 是要调用的方法,是在页面内容添加后执行。
function PoPwin(Title,W,H,Details,CallFun)
{
var bgStyle = "";
var winStyle = "";
winStyle += "Style = 'display:none";
winStyle += "width:"+W+"px;height:"+H+"px;position:absolute; z-index:110;overflow:hidden;"
winStyle += "top:50%; left:50%;margin:"+parseInt(1-H*0.5)+"px 0 0"+parseInt(1-W*0.5)+"px;background-color:#fff;"
winStyle += "border:#000 solid 1px;"
winStyle += "-webkit-box-shadow:5px 2px 6px #000;-moz-box-shadow:5px 2px 6px #000;"/*CSS 3.0*/
winStyle +="'"

/*窗体设计*/
var winobj = $("#PoPwin")


if(winobj.length == 0)
{

var win =""
win += "<div id='PoPwin' "+winStyle+">"
win +="<div id='PoPbar'>"
win +="<table width='100%' border='0' cellspacing='0' cellpadding='0'>"
 win +=" <tr>"
win +="<td>"+Title+"</td>"
win +="<td width=48 valign='Top' align='left'>"
win +="<label class='CloseBtn'></label>"
  win +="</td></tr>"
win +="</table>"

win +="</div>"
win +="<div id='PoPCont'>"
win += Details
win +="</div>"
win +="</div>"
//win +="<div id='PoPwinbg' "+bgStyle+"></div>"
$("body").append(win);
/*设置主体内容高度*/
var PoPbody = $("#PoPdetails")
var BodyHeight = H - (PoP.barH + PoP.funbarH + PoP.MenuH + PoP.DetalTop + PoP.DetalBottom)
PoPbody.height(BodyHeight);

/*关闭按钮设置*/
$(".CloseBtn").hover(
function(){$(this).addClass("CloseBtnOver")},
function(){$(this).removeClass("CloseBtnOver")}
);
$(".CloseBtn").bind("click",function(){
$("#PoPwin").remove();
})

$("#PoPwin").fadeIn("slow",function(){
/*调用设置*/
CallFun
})



}
else
{
$("#PoPbar").find("td").eq(0).html(Title);
$("#PoPCont").html(Details);
var PoPbody = $("#PoPdetails")
var BodyHeight = H - (PoP.barH + PoP.funbarH + PoP.MenuH + PoP.DetalTop + PoP.DetalBottom)
PoPbody.height(BodyHeight);
/*调用设置*/
CallFun
}

这个是要调用的方法,但是通过上面的方法再调用它,就始终不能给元素 附上 单击事件
始终提示 找不到元素
function SetProcutEditPanel(ParentId,Id)
{
/*PoPfunbar*/


$("#PoPfunbar").find("span").each(function(i){
alert($(this).attr("id"))

switch(i)
{
case 0:
/*删除按钮设定*/
if(Id >0)
{
$(this).bind("click",function(){
Sysdel("Product","Id="+Id,ProductLoad(ParentId))
})
}
break;

case 1:
/*取消按钮设定*/
$(this).bind("click",function(){
$("#PoPwin").remove();
});
break;

case 2:
/*保存按钮设定*/
$(this).bind("click",function(){
ProductSave(ParentId,Id)
});
break;
}
})