<marquee width=358>欢迎来到月影社区,希望这里可以成为您美丽的梦幻花园,如果你觉得这里好请分享给您的朋友!- wf66.com</marquee> 将月影社区设置为您的首页将月影社区地址加入到您的收藏栏
月影社区时尚音乐音乐查询IP手机许愿之瓶最新更新文件加密访客留言爱音乐
欢迎您,首页 >> 信息中心 >> 动态按钮生成器(上)

请输入您关键字:


动态按钮生成器(上)

推荐查看本文HTML版本


很COOL的,大家一起来研究研究!
<html><head><meta http-equiv=Content-Type content="text/html; charset=gb2312"><script language="javascript">
<!--Hide
//timer
speed=10;//Array to make Objects[月影读书频道 http://wf66.com/]
Imagi=new Array();//numbers of Link
no_of_images=0;currentImage=-1;function checkBrowser(){var bname=navigator.appName;var ver=parseInt(navigator.appVersion);if(bname=="Netscape"&&ver>=3||bname=="Microsoft Internet Explorer"&&ver>=4);else{alert('You need Netscape Navigator 3 and above or Microsoft Internet Explorer 4 and above')
}}checkBrowser();//The Image Object
function ImageObject(Name,OffSrcPro,OffSrc,OnSrcPro,OnSrc,Width,Height,Alt,Border,URL,LinkTarget){this.Name=Name;this.OffSrcPro=OffSrcPro;this.OffSrc=OffSrc;this.OnSrcPro=OnSrcPro;this.OnSrc=OnSrc;this.Width=Width;this.Height=Height;this.Alt=Alt;this.Border=Border;this.URL=URL;this.LinkTarget=LinkTarget;this.length=11;}function headerSelect(grut,grutv){if(grut.options[0].selected){grutv.value="";}else{for(var y=0;y<grut.length;y++){if(grut.options[y].selected){grutv.value="";grutv.value+=grut.options[y].text;}}}}//Function Performing Form Validation
function checkMe(Me){with(Me){SrcBox1.focus();SrcBox1.blur();SrcBox2.focus();SrcBox2.blur();if(URLBox.value=="http://"||URLBox.value==""){alert("连接的URL没有设置");
URLBox.focus();
return false;[月影读书频道 http://wf66.com/]
}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.selected){with(window.document.mouseOverForm){URLBox.value=Imagi.URL;TargetBox.value=Imagi.LinkTarget;HeadSrc1.value=Imagi.OffSrcPro;HeadSrc2.value=Imagi.OnSrcPro;SrcBox1.value=Imagi.OffSrc;SrcBox2.value=Imagi.OnSrc;NameBox.value=Imagi.Name;BorderBox.value=Imagi.Border
AltBox.value=Imagi.Alt;WidthBox.value=Imagi.Width;HeightBox.value=Imagi.Height;currentImage=i;if(HeadSrc1.value=="file:///")
Header1.options[1].selected=true;else if(HeadSrc1.value=="http://")[月影社区 http://wf66.com/]
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=="http://")
Header2.options[2].selected=true;else if(HeadSrc2.value=="")[月影读书频道 http://wf66.com/]
Header2.options[0].selected=true;}}}}
}[月影读书频道 http://wf66.com/]
}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
function Clean(){abc=document.forms[0].Images;if(Imagi.length==0&&abc.length!=0){for(var loop=0;loop<abc.length;loop++)
abc.options[loop]=null;}}function UpdateOption(){with(window.document.mouseOverForm){if(currentImage!=-1){if(confirm("确信要更新这些数据?")){Imagi[currentImage].URL=URLBox.value;Imagi[currentImage].LinkTarget=TargetBox.value;Imagi[currentImage].Name=NameBox.value;Imagi[currentImage].OffSrcPro=HeadSrc1.value;Imagi[currentImage].OnSrcPro=HeadSrc2.value;Imagi[currentImage].OffSrc=SrcBox1.value;Imagi[currentImage].OnSrc=SrcBox2.value;Imagi[currentImage].Width=WidthBox.value;Imagi[currentImage].Height=HeightBox.value;Imagi[currentImage].Alt=AltBox.value;Imagi[currentImage].Border=BorderBox.value;Images.options[currentImage].text=Imagi[currentImage].Name;alert("数据已经更新!");CleanBoxes(window.document.mouseOverForm);CleanBoxes(window.document.mouseOverForm);}}else
alert("你尚未选择任何项目!");}}function removeIt(){if(document.mouseOverForm.Images.selectedIndex<0)
alert("你尚未选择任何项目!");with(document.mouseOverForm.Images){for(var t=0;t<length;t++){if(options[t].selected){if(confirm("确信移去图片?")){for(var z=t;z<length-1;z++){Imagi[z].URL=Imagi[z+1].URL;Imagi[z].LinkTarget=Imagi[z+1].LinkTarget;Imagi[z].OffSrcPro=Imagi[z+1].OffSrcPro;Imagi[z].OnSrcPro=Imagi[z+1].OnSrcPro;Imagi[z].OffSrc=Imagi[z+1].OffSrc;Imagi[z].OnSrc=Imagi[z+1].OnSrc;Imagi[z].Name=Imagi[z+1].Name;Imagi[z].Border=Imagi[z+1].Border;Imagi[z].Alt=Imagi[z+1].Alt;Imagi[z].Height=Imagi[z+1].Height;Imagi[z].Width=Imagi[z+1].Width;}
Imagi.length-=1;--no_of_images;options[t]=null;CleanBoxes(window.document.mouseOverForm);}}}}}
function Debug(){var no=prompt("Please enter the Object number you want to debug","");var second_argu="Imagi["+no+"]";show_props(Imagi[no],second_argu);}//for debugging usage
function show_props(obj,obj_name){var result="";for(var i in obj)
result+=obj_name+"."+i+" = "+obj+"\n";alert(result);}//Clean the options[0] when page loaded
function Clean(){abc=document.mouseOverForm.Images;if(Imagi.length==0&&abc.length!=0){for(var loop=0;loop<abc.length;loop++)
abc.options[loop]=null;}}//Clean the value in the fields
function CleanBoxes(argv){var x=0;//counter
while(x!=argv.length-1){
if(argv.elements[x].type=="text"){argv.elements[x].value="";}x++;argv.URLBox.value="http://";argv.Header1.options[0].selected=true;argv.Header2.options[0].selected=true;argv.HeadSrc1.focus();argv.HeadSrc1.blur();argv.HeadSrc1.value="";argv.HeadSrc2.focus();argv.HeadSrc2.blur();argv.HeadSrc2.value="";
argv.SrcBox1.focus();argv.SrcBox1.blur();argv.SrcBox1.value="";argv.SrcBox2.focus();argv.SrcBox2.blur();argv.SrcBox2.value="";
argv.URLBox.focus();}}closedd=true;function PopDrive(no){if(closedd){Box=no;First='<html><body bgcolor="white" text="#000000" link="#000099" vlink="#663366" alink="#ff0000" onUnLoad="window.opener.closedd=true;" ><center><br><form><input type="file" name="Drive"><br><br><input type="Button" value="OK" name="OK" onClick="window.opener.Make(document.forms[0],' + Box + ');' + 'window.opener.CheckAndChange(' + Box + ');' + '"><input type="Button" name="Cancel" value="Cancel" onClick="window.close();window.opener.closedd=true;"></form></center><blockquote><font face="宋体" size=2>通过"浏览"按钮从硬盘上选择图片文件,然后按"OK"继续。</font></blockquote></body></html>';Pop=window.open("","DriveWin","Width=350,Height=200,resizable=yes");Pop.document.open();Pop.document.write(First);closedd=false;}else
Pop.focus();}function Make(na,no){na.Drive.focus();na.Drive.blur();if(na.Drive.value==""){
alert("文件尚未选择!");Pop.focus();}else{if(no==1){document.mouseOverForm.SrcBox1.value=na.Drive.value;
document.mouseOverForm.Header1.options[1].selected=true;document.mouseOverForm.HeadSrc1.value="file:///";}else if(no==2){document.mouseOverForm.SrcBox2.value=na.Drive.value;
document.mouseOverForm.Header1.options[1].selected=true;document.mouseOverForm.HeadSrc2.value="file:///";}Pop.close();window.closedd=true;}}//Check the image source,then change the protocol if needed
function CheckAndChange(no){if(no==1){SrcBox=document.mouseOverForm.SrcBox1;Selection=document.mouseOverForm.Header1;ProtocolBox=document.mouseOverForm.HeadSrc1;}else if(no==2){SrcBox=document.mouseOverForm.SrcBox2;Selection=document.mouseOverForm.Header2;ProtocolBox=document.mouseOverForm.HeadSrc2;}var c=SrcBox.value.indexOf("http://");var d=SrcBox.value.indexOf("file:///");if(c>=0){Selection.options[2].selected=true;ProtocolBox.value="http://";Stringo2=SrcBox.value.substring(c+7);SrcBox.value=Stringo2;}else if(d>=0){Selection.options[1].selected=true;ProtocolBox.value="file:///";Stringo3=SrcBox.value.substring(d+8);SrcBox.value=Stringo3;}var find2=SrcBox.value.indexOf("/")
if(SrcBox.value.indexOf(":\\")>0||SrcBox.value.indexOf("|/")>0){Selection.options[1].selected=true;ProtocolBox.value="file:///";var cr=SrcBox.value.indexOf(":\\");if(cr>=0){SrcBox.value=stringInsert(SrcBox.value,"|",cr);for(var countIt=cr;countIt<SrcBox.value.length;countIt++){var Athere=SrcBox.value.charAt(countIt);if(Athere=="\\")
SrcBox.value=stringInsert(SrcBox.value,"/",countIt);
}}}else if((SrcBox.value.indexOf(".com")>0)||(SrcBox.value.indexOf(".edu")>0)||(SrcBox.value.indexOf(".org")>0)||(SrcBox.value.indexOf(".net")>0)||(SrcBox.value.indexOf(".gov")>0)||(SrcBox.value.indexOf(".mil")>0)||(SrcBox.value.indexOf(".arpa")>0)||(SrcBox.value.indexOf(".int")>0)){Selection.options[2].selected=true;ProtocolBox.value="http://";}else if(find2>0){var yes=0;var c=0;var Stringoo2=SrcBox.value.substring(0,find2);for(var a=0;a<3;a++){
var b=Stringoo2.indexOf(".",c);if(b>0){c=b+1;
yes++;}}if(yes==3){
Selection.options[2].selected=true;ProtocolBox.value="http://";}}[月影读书频道 http://wf66.com/]
else{Selection.options[0].selected=true;ProtocolBox.value="";}if(SrcBox.value!=""){var Stringo=SrcBox.value.toUpperCase();if(Stringo.indexOf(".GIF")<0&&Stringo.indexOf(".JPG")<0&&Stringo.indexOf(".JPEG")<0&&Stringo.indexOf(".PNG")<0){alert("看样子没有设置正确的图片文件:)");SrcBox.focus();}}}function stringInsert(initial,replace,position){start=parseInt(position);end=start+replace.length;newVal=initial.substring(0,start)+replace+initial.substring(end,initial.length);return newVal;}function isDigit(form){for(var x=0;x<form.value.length;x++){var y=form.value.charAt(x);var g=parseInt(y);if(g>=0&&g<=9);else{alert("非法的参数!");form.focus();return false;}}return true;}function InsertBelow()[月影社区 http://wf66.com/]
{with(window.document.mouseOverForm)
{if(Images.selectedIndex!=-1)
{for(var g=0;g<Imagi.length-1;g++)
{if(Images.options[g].selected)
{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++;

动态按钮生成器(上) 2006-9-10
转到本主题第:[ 1 ]
相关评论

暂无评论

总计0页 [ ]上一页 下一页
发表评论(揪错)
呢称: * 您尚未登陆,请登录
来自: *
内容:
 

(为防止非法信息,您的言论提交后需要审核才能正常显示)

文学
精品文萃 情感天地 言情小说
网络小说 玄幻小说 悬疑恐怖
武侠小说 古典品谈 外国名著
儿童文学 会员原创 学习园地
杂谈其它
娱乐
爆笑网文 星座占卜 影音动漫
娱乐新闻 影视剧情
诗词
青竹诗歌 个人诗集 宋词雅赏
全唐诗录
新闻
国际新闻 国内新闻 科技新闻
体育新闻
图片
图文专区 艺术长廊 桌面壁纸
精品素材 像素图片
漫画
单幅漫画 爆笑四格 连环漫画
电脑
电脑入门 图形图像 编程开发
游戏
我爱Q宠 最新攻略 最新秘籍
游戏新闻 技巧心得
经济
帕格节电 财经资讯 股市证券
生活
百科知识 外语学院 潮流时尚
健康医疗 宠物花卉 汽车地带
行走天下
美食
面食甜点 家常菜品 药膳食疗
美食天下 烹饪技巧 松辽风味
燕京风味 巴蜀风味 滇黔风味
赣江风味 徽皖风味 闽台风味
齐鲁风味 中州风味 岭南风味
荆楚风味 三晋风味 淞沪风味
苏扬风味 潇湘风味 钱塘风味
民族风味 素斋仿荤
营销
管理杂谈 谈经论道 培训激励
经营战略 职场生涯 公关交际
关于我们版权声明本站导航友情连结作品演示 TOP↑
本论坛言论纯属发表者个人意见,与£月影社区£立场无关。 皖ICP备16024038号-1
禁止发布任何色情/政治/反动相关信息让我们共同来营造一个属于我们的梦幻家园
Copyright ©2001-2006 MoonShadow. All rights reserved.  Version 4.0  Licence 2006.4.2
建站天数:7182天 本站基于ASP+JS构建,完全自主开发,版权归属月影社区 管理员QQ:23165062 Time:109ms