求助一段代码
试了很多次,就是不行,想做一个类似效果的弹出式网页这是代码,如果错误太多,给偶一个现成的也行,不胜感激啊!
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>zcbvzxcv</title>
</head>
<SCRIPT language=JavaScript>
function checklogin(WinId,WinT,WinUrl,Width,Height,Tops,Lefts,Types) {
var WinContent;
var WinDiv = $(WinId);
if (WinDiv) {
CloseAll(WinId);
WinDiv.style.display='block';
WinDiv.style.zIndex='20';
}
else
{
var oDiv = document.createElement("DIV");
oDiv.id = WinId;
oDiv.style.width = Width+16;
oDiv.style.height = Height+36;
oDiv.style.top = Tops;
oDiv.style.left = Lefts;
//oDiv.style.visibility = 'visible';
oDiv.style.position = 'absolute';
oDiv.style.zIndex = 21;
oDiv.onmousedown = function(){window.CloseAll(this.id);m(WinId)};
oDiv.ondblclick = function(){alert(this.style.left+" "+this.style.top)};
if ((Types==1)||(Types==4)) {
WinContent="<iframe width=100% height=100% frameborder=0 scrolling=auto src="+WinUrl+"></iframe>"
}
if (Types==2) {
WinContent="<div style='padding:5px'>"+WinUrl+"</div>"
}
if (Types==3) {
WinContent=""
}
if (Types==4) {
oDiv.innerHTML="<TABLE class='GW_table' cellSpacing=0 cellPadding=0><tr><td colspan='3' class='GW_T'><span class='GW_T_1' style='width:"+(Width-25)+"'>"+WinT+"</span><span class='GW_T_2'><img class='GW_but1_out' src='images/blank.gif' onmouseover=\"PlaySE(1);this.className='GW_but1_on'\" onmouseout=\"this.className='GW_but1_out'\" onmousedown=\"this.className='GW_but1_down'\" onmouseup=\"DelDiv('"+WinId+"')\" alt='关闭窗口'></span></td><tr><td class='GW_C_1'></td><td class='GW_C_2' style='width:"+Width+"px;height:"+Height+"px' valign=top id='Desc_"+WinId+"'>"+WinContent+"</td><td class='GW_C_3'></td></tr><tr><td class='GW_F_1'></td><td class='GW_F_2'></td><td class='GW_F_3'></td></tr></table>"
}
else if(Types==5){
oDiv.innerHTML="<div style='width:470px;height:455px;padding:5px;border:1px #000000 solid;background:#9ECDD6'><div style='height:16px;overflow:hidden;margin-bottom:2px'><div style='float:left;font-weight:bold;width:100px;color:#1093E6'>即时交谈</div><div style='float:right;font-weight:bold;width:15px;overflow:hidden;cursor:hand;color:#1093E6' onclick=DelDiv('"+WinId+"')>×</div></div><iframe width=460 height=427 frameborder=0 scrolling=auto src="+WinUrl+"></iframe></div>";
}else{
oDiv.innerHTML="<TABLE class='GW_table' cellSpacing=0 cellPadding=0><tr><td colspan='3' class='GW_T'><span class='GW_T_1' style='width:"+(Width-25)+"'>"+WinT+"</span><span class='GW_T_2'><img class='GW_but1_out' src='images/blank.gif' onmouseover=\"PlaySE(1);this.className='GW_but1_on'\" onmouseout=\"this.className='GW_but1_out'\" onmousedown=\"this.className='GW_but1_down'\" onmouseup=\"DelDiv('"+WinId+"')\" alt='关闭窗口'></span></td><tr><td class='GW_C_1'></td><td class='GW_C_2' style='width:"+Width+"px;height:"+Height+"px' valign=top id='Desc_"+WinId+"'>"+WinContent+"</td><td class='GW_C_3'></td></tr><tr><td class='GW_F_1'></td><td class='GW_F_2'></td><td class='GW_F_3'></td></tr></table>"
}
document.body.appendChild(oDiv);
if (Types==3) {GameAjax(WinUrl,'Desc_'+WinId,3)}
}
}
</SCRIPT>
<body>
<p><a href="#" onclick ="checklogin('mymanage','玩家属性','UserManage.html',350,400,20,200,1)" >zcbvzxcv</a></p>
</body>
</html>