汉字"); return; } if (form['ck'] == ""){ alert("请输入验证码!"); return; } $.get("/api/v1/comment/save.json", form, function (data) { console.log(data); if (data.code == '200') { location.reload(this); } else { alert(data.msg); } }); } $.fn.serializeObject = function() { var o = {}; var a = this.serializeArray(); $.each(a, function() { if (o[this.name]) { if (!o[this.name].push) { o[this.name] = [ o[this.name] ]; } o[this.name].push(this.value || ''); } else { o[this.name] = this.value || ''; } }); return o; } $(function(){ var oa = $("#content a"); for(var i=0;i").attr("src", src).load(function(){ var windowW = $(window).width();//获取当前窗口宽度   var windowH = $(window).height();//获取当前窗口高度   var realWidth = this.width;//获取图片真实宽度   var realHeight = this.height;//获取图片真实高度   var imgWidth, imgHeight; var scale = 1;//缩放尺寸,当图片真实宽度和高度大于窗口宽度和高度时进行缩放   if(realHeight>windowH*scale) {//判断图片高度   imgHeight = windowH*scale;//如大于窗口高度,图片高度进行缩放   imgWidth = imgHeight/realHeight*realWidth;//等比例缩放宽度   if(imgWidth>windowW*scale) {//如宽度扔大于窗口宽度   imgWidth "> 新闻档案
  • 新闻档案
  • "> 主编档案