用JS简单地控制HTML中 img 标签 的 maxwidth 的办法 形如: <img alt="资讯配图" src='<%= tid.url %>' onload="if(this.width>1024) this.width=1024" /> 加一个onload事件就好