如果直接设置
<script type="text/javascript">var thumbWidth=160;var thumbHeight=0;var thumbHWidth=160;var thumbHHeight=0;</script>
function WriteThumb(img,url,alt,blank,highlight)
{
if (blank==null)
blank=false;
if (highlight==null)
highlight=false;
with(document){
write("<table class='thumbnail'>");
write("<tr><td style='overflow:hidden;'>");
//下面<div>定义了首页调用图片文件的时候图片框的大小,overflow:hidden表示剪切超出图片框的部分
write("<div style='overflow:hidden;160px;height:120px;'>");
write("<a href='");
write(url);
if (blank)
write("' target='_blank'>");
else
write("'>");
write("<img src='");
write(img);
write("' alt='");
write(alt);
write("' ");
if (highlight){
if (thumbHWidth>0){
write(" width='");
write(thumbHWidth);
write("' ");
}
if (thumbHHeight>0){
write(" height='");
write(thumbHHeight);
write("' ");
}
}else{
if (thumbWidth>0){
write(" width='");
write(thumbWidth);
write("' ");
}
if (thumbHeight>0){
write(" height='");
write(thumbHeight);
write("' ");
}
}
//在这里加上</div>
write("></a></div></td></tr></table>");
}
}
{
if (blank==null)
blank=false;
if (highlight==null)
highlight=false;
with(document){
write("<table class='thumbnail'>");
write("<tr><td style='overflow:hidden;'>");
//下面<div>定义了首页调用图片文件的时候图片框的大小,overflow:hidden表示剪切超出图片框的部分
write("<div style='overflow:hidden;160px;height:120px;'>");
write("<a href='");
write(url);
if (blank)
write("' target='_blank'>");
else
write("'>");
write("<img src='");
write(img);
write("' alt='");
write(alt);
write("' ");
if (highlight){
if (thumbHWidth>0){
write(" width='");
write(thumbHWidth);
write("' ");
}
if (thumbHHeight>0){
write(" height='");
write(thumbHHeight);
write("' ");
}
}else{
if (thumbWidth>0){
write(" width='");
write(thumbWidth);
write("' ");
}
if (thumbHeight>0){
write(" height='");
write(thumbHeight);
write("' ");
}
}
//在这里加上</div>
write("></a></div></td></tr></table>");
}
}
2、友情连接
不能把友情连接全部删除后再添加,这样会出错,可能是一个bug把。