代码文件: using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Threading; namespace AjaxTest { &nb...
原理:图片加载完后把图片的尺寸固定在一个固定的范围之内。。 JS Code: script type="text/javascript" var proMaxHeight=100; var proMaxWidth=100; function ImgAuto(ImgD) { var image=new Image(); image.src=ImgD.src; image.onload = function(){ if(image.width0&&image.height0) { var rate=(proMaxWidth/image.widthpr...