首先感谢武眉博的代码..但这个似乎是把页面里所有的大于550尺寸的图片都缩小了...有没有办法控制只有新闻内容的那块里的图片按比例缩小..小弟不才..见笑了..function imgzoom(o) 
{
if(event.ctrlKey) 
{
var zoom = parseInt(o.style.zoom, 10) || 100;
zoom -= event.wheelDelta / 12;
if(zoom > 0) 
{
o.style.zoom = zoom + '%';
}
return false;

else 
{
return true;
}
}function CheckTablesParent(e)
{
//2005-10-24 by 武眉博,huobazi  防止table把文章内容页面撑大
//但是要保证其他部分的table不受影响。
if(e.parentElement.id == ''||e.parentElement.id == null)
{
return false;
}
if(e.parentElement.id == 'content')
{
return true;
}
else
{
obj =  e.parentElement;
CheckTablesParent(obj);
}
}
window.onload = Init;
function Init()
{
//定义最大宽度
var maxWidth = 550;
var maxHeight = 350;

//2005-10-24 by 武眉博,huobazi  防止图片把文章内容页面撑大
//如增加了广告代码需要做类似table那样的调整。
var imgs = document.getElementsByTagName("img");
for(var i=0; i<imgs.length; i++)
{
var img = imgs[i];
if (img.width > maxWidth)
{
img.width = maxWidth;
if (img.parentElement.tagName != "A")
{
img.onclick = function(){window.open(this.src)}
img.style.cursor = "pointer";
img.style.cursor = "hand";
//img.onmousewheel=function(){imgzoom(this);}
//img.alt="点击看大图,或按住Ctrl键滚动鼠标滚轮放大或者缩小";
img.alt=">>-请点击鼠标查看大图-<<";
}
}
}
//2005-10-24 by 武眉博,huobazi  防止table把文章内容页面撑大
var tables = document.getElementsByTagName("table");
for(var i=0; i<tables.length; i++)
{
var table = tables[i];
if (table.offsetWidth > maxWidth && CheckTablesParent(table))
{
table.style.width = maxWidth;
}
}

}
window.status="欢迎访问DotNet男孩社区,希望本站收集的资料对您有用!";
self.moveTo(0,0)
self.resizeTo(screen.availWidth,screen.availHeight)