gusucode.com > 2030网博士成品网站管理系统 PHP网站源码程序 > 2030/dingcan/js/nowcpdetail.js
//详情图片尺寸处理 $(document).ready(function(){ $(".cpdetail").find("img").hide(); var w=$(".cpdetail")[0].offsetWidth-60; $(".cpdetail").find("img").each(function(){ $(this).show(); if(this.offsetWidth>w){ this.style.width=w + "px"; $().setBg(); } }); });