现在的位置: 首页 > 综合 > 正文

JavaScript实现popup日期控件(二)

2013年10月02日 ⁄ 综合 ⁄ 共 3397字 ⁄ 字号 评论关闭

共公部分

css:

body{font-family: verdana;font-size: 9pt;}
table
{font-family: verdana;font-size: 9pt;}
a
{font-family: verdana;font-size: 9pt;color: blue;}
.table_a
{border: #bababa 1px solid;border-top: White 0px solid;}
.table_b
{border-left: #bababa 1px solid;}
.table_c
{border: #bababa 1px solid;}
.table_d
{border-bottom:#bababa 1px solid;}
.td_a
{background:url(../images/qq.gif);background-repeat:repeat-x;}
.td_b
{border-right: #bababa 1px solid; width:150px;}
.button_a
{cursor: hand;}
.h1
{font-family: verdana;font-weight: normal;font-size: 9pt;color:blue;}
.h1_1
{font-family: verdana;font-weight: normal;font-size: 9pt;color:black;}
.h2
{font-family: verdana;font-weight: normal;font-size: 9pt;color:red;}
.h2_2
{font-family: verdana;font-weight: normal;font-size: 9pt;color:green;}
.h3
{font-family: verdana;font-weight: bold;font-size: 10pt;}

.bsdate_frame
{
    BORDER-RIGHT
: black 1px;
    BORDER-TOP
: black 1px;
    FONT-WEIGHT
: normal;
    FONT-SIZE
: 9pt;
    BORDER-LEFT
: black 1px;
    LINE-HEIGHT
: normal;
    BORDER-BOTTOM
: black 1px;
    FONT-STYLE
: normal;
    BACKGROUND-COLOR
: transparent;
    FONT-VARIANT
: normal
}

.bsdate_input
{
    BORDER-RIGHT
: 0px;
    BORDER-TOP
: 0px;
    FONT-WEIGHT
: normal;
    FONT-SIZE
: 9pt;
    BORDER-LEFT
: 0px;
    COLOR
: blue;
    LINE-HEIGHT
: normal;
    BORDER-BOTTOM
: 0px;
    FONT-STYLE
: normal;
    BACKGROUND-COLOR
: transparent;
    TEXT-ALIGN
: right;
    FONT-VARIANT
: normal
}

.bsdate_des
{
    BACKGROUND-COLOR
: transparent
      FONT-SIZE: 12px
;
      FONT-FAMILY
: 宋体;
}

.bsdate_btn
{
    COLOR
: #000000;
    TEXT-DECORATION
: none;
    cursor
:hand;
}

.bsdate_mhdes
{
    BACKGROUND-COLOR
: transparent
    FONT-WEIGHT: bold
;
        font-family
:Fixedsys;
    FONT-SIZE
: 9pt;
}

公共方法:

 

function GetDefineX(ObjectID)
{
    
var iPositionX=ObjectID.offsetLeft;
    
while(ObjectID=ObjectID.offsetParent)
    
{
        iPositionX
+=ObjectID.offsetLeft-ObjectID.scrollLeft;
    }

    
return iPositionX;
}



function GetDefineY(ObjectID)
{
    
var iPositionY=ObjectID.offsetTop;
    
while(ObjectID=ObjectID.offsetParent)
    
{
           iPositionY
+=ObjectID.offsetTop-ObjectID.scrollTop;
    }

    
return iPositionY;
}


String.prototype.Trim 
= function()
{
return this.replace(/(^s*)|(s*$)/g, "");
}


String.prototype.LTrim 
= function()
{
return this.replace(/(^s*)/g, "");
}


String.prototype.RTrim 
= function()
{
return this.replace(/(s*$)/g, "");
}

var BSPopup = window.createPopup();
BSDate.cl_resClickLater    
=    '请在页面显示完了之后,再点击。';
BSDate.cl_resDateDrop    
=    '';
BSDate.cl_resDateTitle    
=    '选择日期';
BSDate.cl_resDateUp    
=    '';
BSDate.cl_resDay    
=    '';
BSDate.cl_resMonth    
=    '';
BSDate.cl_resMonth1    
=    '一月';
BSDate.cl_resMonth10    
=    '十月';
BSDate.cl_resMonth11    
=    '十一月';
BSDate.cl_resMonth12    
=    '十二月';
BSDate.cl_resMonth2    
=    '二月';
BSDate.cl_resMonth3    
=    '三月';
BSDate.cl_resMonth4    
=    '四月';
BSDate.cl_resMonth5    
=    '五月';
BSDate.cl_resMonth6    
=    '六月';
BSDate.cl_resMonth7    
=    '七月';
BSDate.cl_resMonth8    
=    '八月';
BSDate.cl_resMonth9    
=    '九月';
BSDate.cl_resMonthNext    
=    '下月';
BSDate.cl_resMonthNextBtn    
=    '';
BSDate.cl_resMonthPrev    
=    '上月';
BSDate.cl_resMonthPrevBtn    
=    '';
BSDate.cl_resWeek1    
=    '';
BSDate.cl_resWeek2    
=    '';
BSDate.cl_resWeek3    
=    '';
BSDate.cl_resWeek4    
=    '';
BSDate.cl_resWeek5    
=    '';
BSDate.cl_resWeek6    
=    '

抱歉!评论已关闭.