javascript 中的image对象
图像对象名称=new Image([宽度],[高度]) //px
· 图像对象的属性:
border complete height hspace lowsrc name src vspace width
· 图像对象的事件:
onAbort onError onKeyDown onKeyPress onKeyUop onLoad
预载入图片:
img0 = new Image();
img0.src = "images/snow0.gif";
图片预载入函数:
function img-preload(idx){
eval("img"+idx+" = new Image()");
eval("img"+idx+".src = 'images/snow"+idx+".gif'");
}