【转】JS - 图片长宽自动变换

图片长宽自动变换网页脚本。
针对<img src="http://-helloday-darkst.blog.163.com/blog/" name="u">

<script type="text/javascript">

var b = 1;
var c = true;

function fade()
{
if(document.all);
if(c==true) {b++}
if(b==100) {b--; c=false}
if(b==10) {b++; c=true}
if(c==false) {b--}
u.width=150+b;
u.height=125-b;
setTimeout("fade()",50)
}

</script>