123456789101112131415161718192021222324252627282930313233343536373839 |
- function isEmpty(obj){
- if(typeof obj == "undefined" || obj == null || obj == ""){
- return true;
- }else{
- return false;
- }
- }
- // 导出Excel
- function dc() {
- var title = $("#title").text();
- var year = $("#year").val() ;
- var myDate = new Date();
-
- alert(countdown()+year+"_"+title);
- $("#add").tableExport({fileName: countdown()+year+"_"+title,type:"xlsx",escape:"false"});
-
- }
- function countdown() {
- var myDate = new Date();
- //获取当前年
- var year=myDate.getFullYear();
- //获取当前月
- var month=myDate.getMonth()+1;
- //获取当前日
- var date=myDate.getDate();
- var h=myDate.getHours(); //获取当前小时数(0-23)
- var m=myDate.getMinutes(); //获取当前分钟数(0-59)
- var s=myDate.getSeconds();
- var now=year+getNow(month)+getNow(date)+getNow(h)+getNow(m)+getNow(s);
- // 赋值给展示时间
- // $('#Times').html('系统时钟:'+now);
- return now;
- }
- // 获取当前时间
- function getNow(s) {
- return s < 10 ? '0' + s: s;
- }
|