$(function () { // 绉婚櫎鍥剧墖瀹介珮 $(".removeimg").find("img").removeAttr("width"); $(".removeimg").find("img").removeAttr("height"); $(".removeimg").find("img").css("width", "auto"); $(".removeimg").find("img").css("height", "auto"); }); //=====================layer========================= //灏佽ajax var ajaxLoadIndex; var ajaxLoadOpen = 1; var before_request = 1; function myajax(url, data, dataType, type, async, responseFun) { $.ajax({ url: url, data: data, dataType: dataType, type: type, async: async, success: responseFun, beforeSend: beforeSend, error: error, complete: complete }); } function beforeSend() { if (before_request == 0) // 涓婁竴娆¤姹傛病鍥炴潵 涓嶈繘琛屼笅涓€娆¤姹 return false; before_request = 0; if (ajaxLoadOpen == 1) ajaxLoadIndex = layer.open({ type: 2 }); } function error() { layer.open({ content: '璇锋眰澶辫触', skin: 'msg', time: 2 }); } function complete() { before_request = 1; myajax_close(); } function myajax_close() { if (ajaxLoadOpen == 1) layer.close(ajaxLoadIndex); else ajaxLoadOpen = 1; } function showErrorMsg(msg) { layer.open({ content: '
' + msg + '
', skin: 'msg', time: 2 }); } //灏佽layer寮圭獥 //鏍囬锛屽唴瀹癸紝鍥炬爣锛?璀﹀憡锛?姝g‘锛?閿欒锛 function la_open(content, icon, callback) { var iconStr = ''; if (icon == 0) { iconStr = ''; } if (icon == 1) { iconStr = ''; } if (icon == 2) { iconStr = ''; } content = '' + content + ''; if (typeof (callback) == "undefined") { layer.open({ content: '
' + iconStr + content + '
', skin: 'msg', time: 2 }); } else { layer.open({ content: '
' + iconStr + content + '
', skin: 'msg', time: 2, end: function () { callback() } }); } } //璇㈤棶妗 function la_confirm(msg, b1, b2, btn1, btn2) { if (b1 == "") { b1 = "纭"; } if (b2 == "") { b2 = "鍙栨秷"; } //璇㈤棶妗 layer.open({ content: msg, btn: [b1, b2], yes: function (index) { btn1(); }, no: function () { btn2(); } }); } // 璋冪敤绀轰緥 // myajax("/main/ajax/manage.ashx", { // action: "" // }, 'json', 'post', true, callback); // function callback(res) { // if (res.status == "1") { // la_open(res.msg, 1, function () { }); // } else { // la_open(res.msg, 2, function () { }); // } // } // la_open("OK", 1, function () { }); // la_confirm("鏄惁纭鍒犻櫎?", "", "", function () { // }, function () { }); // ============================绉诲姩鍒楄〃涓嬫粦鏄剧ず============================= function ajax_foot_submit(page, catids, table, fan, keywords) { $.ajax({ url: "/index.php?g=Wap&m=Index&a=" + fan + "&p=" + page, type: "get", data: { table: table, catids: catids, keywords: keywords }, dataType: "json", success: function (result) { output_html(result); } }); }