<script src='<%=ResolveUrl("~/JScript/Scripts/jquery-ui.min.js") %>' type="text/javascript"></script>
<script src='<%=ResolveUrl("~/JScript/Scripts/jquery-ui-timepicker-addon.js") %>'
    type="text/javascript"></script>
<script src='<%=ResolveUrl("~/JScript/Scripts/jquery.ui.datepicker-zh-TW.js") %>'
    type="text/javascript"></script>
<script src='<%=ResolveUrl("~/JScript/Commond.js") %>' type="text/javascript"></script>
<link href="<%=ResolveUrl("~/CSS/jquery-ui.css") %>" rel="stylesheet" type="text/css" />
<link href="<%= ResolveUrl("~/CSS/cssDefault.css") %>" rel="stylesheet" type="text/css" />
<script src='<%=ResolveUrl("~/JScript/Scripts/jquery.timer.js") %>' type="text/javascript"></script>

//跳出錯誤處理
window.setAlert = function (e) {
    alert(e);
}

//時間處理
try {
    window.setDatepicker = function (obj, txt, defaultdate, enddatepicker, minDate) {
        if (defaultdate) {
            $(obj).val($.datepicker.formatDate('yy/mm/dd', new Date()));
        }
        $(obj).datepicker({
            dateFormat: 'yy/mm/dd',
            showOn: 'both',
            buttonImageOnly: true,
            changeYear: true,
            changeMonth: true,
            showOtherMonths: true,
            selectOtherMonths: true,
            autoSize: true,
            buttonImage: tUrl + 'Image/Commond/calendar.gif',//日曆圖案位置
            buttonText: txt,
            regional: 'zh-TW',
            onClose: function (selectedDate) {
                if ('' != enddatepicker && null != enddatepicker) {
                    $(enddatepicker).datepicker('option', 'minDate', selectedDate);
                    $('.ui-datepicker-trigger').css({
                        'cursor': 'pointer',
                        'vertical-align': 'middle'
                    });
                }
            }
        });
        if (minDate) {
            $(obj).datepicker('option', 'minDate', new Date());
        }
        $('.ui-datepicker-trigger').css({
            'cursor': 'pointer',
            'vertical-align': 'middle'
        });
    }
} catch (e) { }

//按鍵處理
try {
    window.setBtnClick = function (name, fuc) {
        $(function () {
            $(name).click(fuc);
        });
    }
} catch (e) {
    setAlert(e);
}

//dorpdown處理
try {
    window.setDllChange = function (name, fuc) {
        $(function () {
            $(name).change(fuc);
        });
    }
} catch (e) {
    setAlert(e);
}

, , , , , , , , ,

倧齊 發表在 痞客邦 PIXNET 留言(0) 人氣()