Web_ScienceManage/js/PopWindow.js

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

//-----------------------------------------------------------------------
//  简易弹出窗体 Javascript 页面脚本控件,适用于微软的IE(5.0以上)浏览器
//  以及以IE为内核的其他浏览器
//  作者 : 程学明
//  版本 : 1.0
//  创建 : 2009-07-06
//-----------------------------------------------------------------------

function PopWindow()
{
    this.mShadowBorder = 2;
    this.mCaptionHeight = 32;
}
/*
 * --------------------------------------------------------------------------
 * 摘要:显示简易弹出窗体
 * 参数:
 *      url         要在弹出窗口中显示的页面链接
 *      title       弹出窗口的显示标题
 *      width       弹出窗口的宽度,确保值为一个正整数,函数不做参数值的检测
 *      height      弹出窗口的高度,确保值为一个正整数,函数不做参数值的检测
 *      canClose    弹出窗口是否具有关闭按钮,如果不设置此参数则默认是有。
 * --------------------------------------------------------------------------
*/
PopWindow.prototype.Show=function(url,title,width,height,canClose){
    if(this.mMasksLayer && this.mWinArea && this.mWinShadow && this.mWindow && document.body){
        var clientHeight = height;
        var clientWidth = width;
     
       //没有滚动条
       if(document.body.clientHeight>clientHeight){
            //this.mWinArea.style.top = (document.body.clientHeight-clientHeight)/2 + "px";
            // changed by htxu,2009/8/24
            this.mWinArea.style.top = (document.body.clientHeight-clientHeight)/2 + document.body.scrollTop + "px";
        }else{
            this.mWinArea.style.top = "10px";
        }
        if(document.body.clientWidth>clientWidth){
            //this.mWinArea.style.left = (document.body.clientWidth-clientWidth)/2 + "px";
            this.mWinArea.style.left = (document.body.clientWidth-clientWidth)/2 + document.body.scrollLeft + "px";
        }else{
            this.mWinArea.style.left = "0px";
        }
        //有滚动条
        if (document.body.clientHeight > window.screen.height)
        {
            
            this.mWinArea.style.top = document.documentElement.scrollTop+clientHeight/2+"px";
        }


        
        this.mWinArea.style.width = (this.mShadowBorder+clientWidth)+"px";
        this.mWinArea.style.height = (this.mShadowBorder+clientHeight)+"px";
        
        this.mWindow.style.width = clientWidth+"px";
        this.mWindow.style.height = clientHeight+"px";
        
        this.mWinClient.style.height = (clientHeight-this.mCaptionHeight)+"px";
        
后面还有 105 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。