| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 486 人关注过本帖
标题:求助一段代码
只看楼主 加入收藏
zfjyyzycl
Rank: 2
等 级:论坛游民
帖 子:239
专家分:10
注 册:2006-4-15
结帖率:28.57%
收藏
 问题点数:0 回复次数:0 
求助一段代码
试了很多次,就是不行,想做一个类似效果的弹出式网页

这是代码,如果错误太多,给偶一个现成的也行,不胜感激啊!

<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>

未命名.JPG (122.47 KB)
图片附件: 游客没有浏览图片的权限,请 登录注册
搜索更多相关主题的帖子: 代码 
2009-07-29 15:49
快速回复:求助一段代码
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.026276 second(s), 9 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved