日期:2011-02-11  浏览次数:21071 次

由于内容超长,只好分2次贴出,以下为下半部分:
Images.length+=1;for(var b=Images.options.length-1;b>g;b--)
{Images.options[b].text=Images.options[b-1].text;}Images.options[g+1].text=Imagi[g+1].Name;CleanBoxes(window.document.mouseOverForm);}}}else
{if(Images.length!=0)
{var g=-1;var r=no_of_images;Imagi[r]=new ImageObject(Imagi[r-1].Name,Imagi[r-1].OffSrcPro,Imagi[r-1].OffSrc,Imagi[r-1].OnSrcPro,Imagi[r-1].OnSrc,Imagi[r-1].Width,Imagi[r-1].Height,Imagi[r-1].Alt,Imagi[r-1].Border,Imagi[r-1].URL,Imagi[r-1].LinkTarget);for(var p=Imagi.length-2;p>g;p--)
{Imagi[p].Name=Imagi[p-1].Name;Imagi[p].OffSrcPro=Imagi[p-1].OffSrcPro;Imagi[p].OffSrc=Imagi[p-1].OffSrc;Imagi[p].OnSrcPro=Imagi[p-1].OnSrcPro;Imagi[p].OnSrc=Imagi[p-1].OnSrc;Imagi[p].Width=Imagi[p-1].Width;Imagi[p].Height=Imagi[p-1].Height;Imagi[p].Alt=Imagi[p-1].Alt;Imagi[p].Border=Imagi[p-1].Border;Imagi[p].URL=Imagi[p-1].URL;Imagi[p].LinkTarget=Imagi[p-1].LinkTarget;}
Imagi[g+1].URL=URLBox.value;Imagi[g+1].LinkTarget=TargetBox.value;Imagi[g+1].Name=NameBox.value;Imagi[g+1].OffSrcPro=HeadSrc1.value;Imagi[g+1].OnSrcPro=HeadSrc2.value;Imagi[g+1].OffSrc=SrcBox1.value;Imagi[g+1].OnSrc=SrcBox2.value;Imagi[g+1].Width=WidthBox.value;Imagi[g+1].Height=HeightBox.value;Imagi[g+1].Alt=AltBox.value;Imagi[g+1].Border=BorderBox.value;no_of_images++;
Images.length+=1;for(var b=Images.options.length-1;b>g;b--)
{Images.options[b].text=Images.options[b-1].text;}Images.options[g+1].text=Imagi[g+1].Name;CleanBoxes(window.document.mouseOverForm);}else
alert("缺少项目!")
}}}function CheckIt(array,string){if(array==null||array=="")
variable="";else
variable=string+array+"\"";return variable;}function generateIt() {if (document.mouseOverForm.Images.length != 0) {HeadCode = "<SCRIPT LANGUAGE=\"Javascript\">\r" + "<" + "!-" + "-Hide\r\r";HeadCode += "//http://www.njcatv.net/javascript/dai5.htm\r\r";HeadCode += "function isCompatible()\r" + "{\r" + "var BrowserName=navigator.appName;\r" + "var BrowserVer=parseInt(navigator.appVersion);\r" + "var Compatible=(BrowserName==\"Netscape\"&&BrowserVer==3)||(BrowserName==\"Netscape\"||BrowserVer==4)||(BrowserName==\"Microsoft Internet Explorer\"||BrowserVer==4)\r" + "return Compatible;\r" + "}\r\r";HeadCode += "function flipIt(img,tothis)\r" + "{\r" + "if(isCompatible())\r" + "{\r" + "img.src=tothis.src;\r" + "}\r" + "}\r\r";BodyCode = "";for (var count = 0; count < Imagi.length; count++) {var xName = Imagi[count].Name;var xNameOff = Imagi[count].OffSrcPro + Imagi[count].OffSrc;var xNameOn = Imagi[count].OnSrcPro + Imagi[count].OnSrc;var Target = CheckIt(Imagi[count].LinkTarget, "TARGET=\"");var Border=CheckIt(Imagi[count].Border," BORDER=\"");var Alt = CheckIt(Imagi[count].Alt, "ALT=\"");var Width=CheckIt(Imagi[count].Width," WIDTH=\"");var Height = CheckIt(Imagi[count].Height, "HEIGHT=\"");var MouseOver="onMouseOver=\"flipIt(document." + xName + "," + xName + "On);\"";
var MouseOut="onMouseOut=\"flipIt(document." + xName + "," + xName + "Off);\"";
HeadCode+=xName+"Off = new Image();\r";HeadCode+=xName+"Off.src = "+"\"" + xNameOff + "\";"+"\r";HeadCode+=xName+"On = new Image();\r";HeadCode+=xName+"On.src = "+"\"" + xNameOn + "\";"+"\r";BodyCode+="<A HREF=\""+ Imagi[count].URL + "\""+Target+" "+MouseOver+" "+MouseOut+"><IMG SRC=\"" + xNameOff + "\" NAME=\"" + xName + "\""+Border+Alt+Width+Height+"></A>\r\r";}HeadCode+="\r/"+"/End Hide-"+"->\r";Emulate=window.open("","CodeWindow","width=640,height=420,status=yes,resizable=yes,scrollbars=yes");Emulate.document.clear();Emulate.document.write('<html><head><title>Code generated</title></head><body bgcolor="#ffffff" text="#000000" link="#000099" vlink="#663366" alink="#ff0000">');Emulate.document.write("<br><br><center><font face=\"宋体\">如下代码拷贝到<font color=\"red\">HEAD</font>标签间</font></center><form name=\"genCode\"><cente