个人改良了一下做做成函数:
调用函数
$(document).ready(function(){ autoImg("#text2 img",600);autoImg("#text1 img",600);});
函数
function autoImg(tNmae,wValue) { $(tNmae).each(function(){ if (this.width>wValue) {this.width = wValue;} }); }
Copyright @ 2024 天使半只翼 Powered by .NET 9.0 on Kubernetes Powered by: .Text and ASP.NET Theme by: .NET Monster