网页代码设计技巧系列之-----自制相册.doc_第1页
网页代码设计技巧系列之-----自制相册.doc_第2页
网页代码设计技巧系列之-----自制相册.doc_第3页
网页代码设计技巧系列之-----自制相册.doc_第4页
网页代码设计技巧系列之-----自制相册.doc_第5页
已阅读5页,还剩61页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

脚本说明:把如下代码加入区域中 var javascript_version = 1.0; javascript_version = 1.1; = main; / names current window as mainPicVar = 0;/ Object Fix function Fix(DatVal, PicVal, TitVal, TxtVal) this.DatVal = DatVal this.PicVal = PicVal this.TitVal = TitVal this.TxtVal = TxtVal / Create new main array. var SuzyArray = new Array()/ The following lines are the ONLY LINES in this whole script that you need to change!/ SuzyArrayPicVar+ = new Fix(date, picname.jpg, pic title, pic description)SuzyArrayPicVar+ = new Fix(2/25/2003, 2003-02-25-27.jpg, Our house in the snow, I took this beautiful picture this morning. The streets are one solid sheet of ice right now! Its insane. I dont think well be driving anywhere soon.)SuzyArrayPicVar+ = new Fix(1/5/2003, 2003-01-05-03.jpg, Rain in the trees, I had taken Rainlin out for a walk in the stroller, and we saw these cute little trees and stopped for a picture.)SuzyArrayPicVar+ = new Fix(1/31/2003, 2002-12-31-01.jpg, Scott and Suzy, I asked one of our friends to take this picture for us. Could my handsome hubbys eyes get any more blue? :)SuzyArrayPicVar+ = new Fix(12/7/2002, 2002-12-07-05.jpg, on the hayride, Daddy was having a wonderful time on the hayride. Dylan wasnt too sure about it!)SuzyArrayPicVar+ = new Fix(11/9/2002, 2002-11-09-09.jpg, Boys on wheels, Daddy was holding Dylan up with his knees! Those skates sure are hard to stand up in, but once he got the knack for it Dylan didnt want to take them off.)SuzyArrayPicVar+ = new Fix(10/30/2002, 2002-10-30-01.jpg, Dylan the Builder, Heres Dylan, all dressed up and ready for Halloween! Everything in his life is Bob-the-builder related.)SuzyArrayPicVar+ = new Fix(6/19/2002, 2002-06-19-07.jpg, Jabbas face, Its hard, really hard, to get a picture of Jabbas face without him charging the camera.)SuzyArrayPicVar+ = new Fix(6/11/2002, 2002-06-11-11.jpg, Rain behind the house, The brick that makes up the outside of the house proved to be really pretty for framing pictures of the kidlets.)SuzyArrayPicVar+ = new Fix(6/9/2002, 2002-06-09-04.jpg, Scott and Rainlin, I just had to take some pictures of them before church. They looked so nice!)SuzyArrayPicVar+ = new Fix(6/9/2002, 2002-06-09-01.jpg, Rainlin and Susan, We both wore our pretty blue flower dresses that Sunday.)SuzyArrayPicVar+ = new Fix(6/7/2002, 2002-06-07-24.jpg, Kaytlyn and Rainlin playing dress-up, Kaytlyn has a whole bunch of dress-up clothes, and Rain loves to go over to her house and play dress-up with her.)SuzyArrayPicVar+ = new Fix(6/2/2002, 2002-06-02-13.jpg, The Three Amigos, Dylan, Daddy, and Rainlin were watching Castaway on the couch. We just moved all the furniture into that great room, and everyone seems to like it better in there.)SuzyArrayPicVar+ = new Fix(6/1/2002, 2002-06-01-09.jpg, Simon, For those of you who have never met him, this is Simon. Hes the tatoo I have on my left leg. I drew everything of the tattoo except for his head, which came from a greeting card my mother sent me while I was in the military.)last = PicVar - 1;current = 0;function ShowSuzyPic(newpic) / (not working on some browsers) document.playsound.play();current = newpic;SelectionBox = document.SuzyForm.SuzyDropdown;SelectionBox.optionscurrent.selected = true;document.getElementById(SuzySpot).innerHTML = ;document.getElementById(Journal).outerHTML = + SuzyArraycurrent.DatVal + + SuzyArraycurrent.TxtVal + ;if (document.SuzyForm.WhereView1.checked) timerID = setTimeout(SuzyPicRemote(SuzyArraycurrent.PicVal,current),1000)function RandomSuzyPic() randompic = Math.floor(Math.random()*PicVar);last = current;ShowSuzyPic(randompic);function PreviousSuzyPic() last = current;current-;if(current=PicVar) current = 0;ShowSuzyPic(current);function SuzyPicRemote(picName,whichPic) ShowingImage = new Image();ShowingImage.src = picName;wid = ShowingImage.width + 50;hei = ShowingImage.height + 50;if (wid 30 | hei 30) wid=650;hei=490;if (screen.width wid | screen.height hei) wid = screen.width - 50;hei = screen.height - 50;OpenWindow = window.open(/photoalbum/clear.html, remoteWin, resizable=1, scrollbars=1, toolbar=0, left=15, top=10, width= + wid + , height= + hei);OpenWindow.document.write();OpenWindow.document.close();function FindPic() TotalFound = 0;SearchString = document.SuzyForm.SearchWord.value;SearchString = SearchString.toLowerCase();WriteResults = window.open(clear.html,resultwindow,height=300, width=300, toolbar=0, status=0, menubar=0, resizable=1, scrollbars=1);WriteResults.document.open();WriteResults.document.write(+ You searched for: + SearchString + Results:);for (loop=0; loop PicVar ; loop+) Keyword = SuzyArrayloop.TxtVal;Keyword = Keyword.toLowerCase();URL = SuzyArrayloop.PicVal;title = SuzyArrayloop.TitVal;title = title.toLowerCase();SearchResult = Keyword.indexOf(SearchString);SearchResult2 = title.indexOf(SearchString);if (SearchResult != -1 | SearchResult2 != -1) last = current;WriteResults.document.write( + title + );TotalFound+;WriteResults.document.write(Returned + TotalFound + results.);WriteResults.document.close();if(javascript_version 1.0) /delay a bit here because IE4 encounters errors/when trying to focus a recently opened windowsetTimeout(WriteResults.focus();,250);/ -document.write(); document.write( + SuzyArraycurrent.DatVal + + SuzyArraycurrent.TxtVal);input type=button v

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论