JS+Ajax+Jquery实现页面无刷新分页以及分组 超强的(2)

分页标题#e#


Common.js:
//时间格式化

function getDateByFormat(oldDate){
                var Dy = oldDate.getFullYear();
                var Dm = oldDate.getMonth()+1;
                var Dd = oldDate.getDate();
                if(Dm<10){
                    Dm = "0" + Dm;
                }
                if(Dd<10){
                    Dd = "0" + Dd;
                }
                var newDate = Dy+'-'+Dm+'-'+Dd;

                    return newDate;
                }
//日期-时间格式化
function getDateTimeByFormat(oldDate){
                var Dy = oldDate.getFullYear();
                var Dm = oldDate.getMonth()+1;
                var Dd = oldDate.getDate();
                var Dh = oldDate.getHours();
                var Dmi = oldDate.getMinutes();&nbsp;&nbsp;
                var Ds    = oldDate.getSeconds(); &nbsp;&nbsp;
                if(Dm<10)
                    Dm = "0" + Dm;
                if(Dd<10)
                    Dd = "0" + Dd;

                if(Dh<10)
                 Dh = "0" + Dh;
                if(Dmi<10)
                    Dmi = "0" + Dmi;
                if(Ds<10)
                    Ds = "0" + Ds;

                var newDate = Dy+'-'+Dm+'-'+Dd+' '+Dh+':'+Dmi+':'+Ds;
                    return newDate;
                }

//只能输入数字
function txtnumber()
            {
                if ((event.keyCode >57) || (event.keyCode <48))
                    return false;else return true;
            }

        //只能输入数字和字母

    function txtnumchar()
            { //65- 90 97-122
                var kcode = event.keyCode;
                if (kcode >= 48 && kcode <= 57)
                    return true;
                else if(kcode >= 65 && kcode <= 90)
                    return true;
                else if (kcode >= 97 && kcode <= 122)
                    return true;
                else
                    return false;
            }


getCommonTable.js

复制代码 代码如下:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wjyszy.html