/** * Created by Incredible on 2017-09-12 0012. */ $(function () { var button = $(".button"); var buttonUrl = "../api/system/selectSitePage"; var startIndex = 0; $.ajax({ url:buttonUrl, type:'post', data:{ startIndex:startIndex, pageSize:12, }, dataType:'json', success:function(data){ var str = ""; for(var i = 0;i'; str+=data[i].siteName; str+=''; } button.html(str); button.find("div:first").addClass("active_"); var toggle =$('.cont .cont_toogle'); toggle.click(function () { toggle.removeClass("active_"); $(this).addClass("active_"); }); } }); var cont_icon = $(".cont_icon"); cont_icon.click(function(){ if($(this).attr("data-icon")=="right"){ ++startIndex; $.ajax({ url:buttonUrl, type:'post', data:{ startIndex:startIndex, pageSize:12, }, dataType:'json', success:function(data){ var str = ""; for(var i = 0;i'; str+=data[i].siteName; str+=''; } button.html(str); button.find("div:first").addClass("active_"); var toggle =$('.cont .cont_toogle'); toggle.click(function () { toggle.removeClass("active_"); $(this).addClass("active_"); }); } }); }else{ --startIndex; $.ajax({ url:buttonUrl, type:'post', data:{ startIndex:startIndex, pageSize:12, }, dataType:'json', success:function(data){ var str = ""; for(var i = 0;i'; str+=data[i].siteName; str+=''; } button.html(str); button.find("div:first").addClass("active_"); var toggle =$('.cont .cont_toogle'); toggle.click(function () { toggle.removeClass("active_"); $(this).addClass("active_"); }); } }); } }); /*
车溪
*/ // // var iframes = document.getElementsByTagName('iframe'); // // for (var i = 0, j = iframes.length; i < j; ++i) { // // 放在闭包中,防止iframe触发load事件的时候下标不匹配 // (function(_i) { // iframes[_i].onload = function() { // this.style.visibility = 'hidden'; // // this.style.display = 'none'; // // // 提前还原高度 // this.setAttribute('height', 'auto'); // 或设为'' // // // 再在下一轮事件循环中设置新高度 // setTimeout(function() { // iframes[_i].setAttribute('height', iframes[_i].contentWindow.document.body.scrollHeight); // // iframes[_i].style.visibility = 'visible'; // // iframes[_i].style.display = 'block'; // }, 0); // } // })(i); // } })/** *实时显示系统时间 */ function getLangDate(){ var dateObj = new Date(); //表示当前系统时间的Date对象 var year = dateObj.getFullYear(); //当前系统时间的完整年份值 var month = dateObj.getMonth()+1; //当前系统时间的月份值 var date = dateObj.getDate(); //当前系统时间的月份中的日 var day = dateObj.getDay(); //当前系统时间中的星期值 var weeks = ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]; var week = weeks[day]; //根据星期值,从数组中获取对应的星期字符串 var hour = dateObj.getHours(); //当前系统时间的小时值 var minute = dateObj.getMinutes(); //当前系统时间的分钟值 var second = dateObj.getSeconds(); //当前系统时间的秒钟值 //如果月、日、小时、分、秒的值小于10,在前面补0 if(month<10){ month = "0"+month; } if(date<10){ date = "0"+date; } if(hour<10){ hour = "0"+hour; } if(minute<10){ minute = "0"+minute; } if(second<10){ second = "0"+second; } var newDate = year+"-"+month+"-"+date+" "+hour+":"+minute+":"+second; document.getElementById("dateStr").innerHTML = " "+newDate+" "; setTimeout("getLangDate()",1000);//每隔1秒重新调用一次该函数 }