动态按钮生成器(上)

2018-09-06 13:14

阅读:679

  很COOL的,大家一起来研究研究!

<!--Hide
//timer
speed=10;//Array to make Objects
Imagi=new Array();//numbers of Link
=4);else{alert(You need Netscape Navigator 3 and above or Microsoft Internet Explorer 4 and above)
}}checkBrowser();//The Image Object
function checkMe(Me){with(Me){SrcBox1.focus();SrcBox1.blur();SrcBox2.focus();SrcBox2.blur();if(URLBox.value==连接的URL没有设置);
URLBox.focus();
return false;
}if(SrcBox1.value==){alert(MouseOut图片尚未设置);
SrcBox1.focus();
return false;
}if(SrcBox2.value==){
alert(MouseOver图片尚未设置);
SrcBox2.focus();
return false;
}
if(NameBox.value==){
alert(图片尚未命名);
NameBox.focus();
return false;
}
return true;}}
function checkAndShow(){
with(window.document.mouseOverForm.Images){if(options.length!=0){for(var i=0;i<options.length;i++){if(options[i].selected){with(window.document.mouseOverForm){URLBox.value=Imagi[i].URL;TargetBox.value=Imagi[i].LinkTarget;HeadSrc1.value=Imagi[i].OffSrcPro;HeadSrc2.value=Imagi[i].OnSrcPro;SrcBox1.value=Imagi[i].OffSrc;SrcBox2.value=Imagi[i].OnSrc;NameBox.value=Imagi[i].Name;BorderBox.value=Imagi[i].Border
AltBox.value=Imagi[i].Alt;WidthBox.value=Imagi[i].Width;HeightBox.value=Imagi[i].Height;currentImage=i;if(HeadSrc1.value==file:///)
Header1.options[1].selected=true;else if(HeadSrc1.value==
Header1.options[2].selected=true;else if(HeadSrc1.value==)
Header1.options[0].selected=true;if(HeadSrc2.value==file:///)
Header2.options[1].selected=true;else if(HeadSrc2.value==
Header2.options[2].selected=true;else if(HeadSrc2.value==)
Header2.options[0].selected=true;}}}}
}
}function insertItem(){with(window.document.mouseOverForm){if(checkMe(window.document.mouseOverForm)){Imagi[no_of_images]=new ImageObject(NameBox.value,HeadSrc1.value,SrcBox1.value,HeadSrc2.value,SrcBox2.value,WidthBox.value,HeightBox.value,AltBox.value,BorderBox.value,URLBox.value,TargetBox.value);Images.length+=1;Images.options[Images.length-1].text=Imagi[no_of_images].Name;++no_of_images;CleanBoxes(window.document.mouseOverForm);CleanBoxes(window.document.mouseOverForm);}}}//Clean options[0] when page loaded


评论


亲,登录后才可以留言!