版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、.网页制作常用源代码目 录当前日历星期程序1放在页首的代码2倒计时源代码3插入本机视频文件4插入网络视频文件4嵌套页面代码5横向滚动条代码5向上滚动条代码5最后更新时间5用按钮链接网站的程序6固定字号大小6去掉下划线代码610秒后自动链接到别的网页6表格代码7鼠标拖动数字时钟9当前日历星期程序例:2010年11月24日 星期三 today=new Date(); function initArray() this.length=initArray.arguments.length for(var i=0;ithis.length;i+) thisi+1=initArray.argumentsi
2、 var d=new initArray( 星期日, 星期一, 星期二, 星期三, 星期四, 星期五, 星期六); document.write( , today.getYear(),年, today.getMonth()+1,月, today.getDate(),日 , dtoday.getDay()+1, ); 放在页首的代码P FONT-SIZE: 9ptTD FONT-SIZE: 9ptINPUT FONT-SIZE: 9ptSELECT FONT-SIZE: 9ptA TEXT-TRANSFORM: none; COLOR: #000000; TEXT-DECORATION: non
3、eA:hover COLOR: #ff0080; TEXT-DECORATION: noneA:active COLOR: #ff0080; TEXT-DECORATION: none.subject FONT-SIZE: 12px; COLOR: #000000; TEXT-DECORATION: none.title1 FONT-SIZE: 12px; COLOR: #660000; TEXT-DECORATION: none.title1:hover FONT-SIZE: 12px; COLOR: #669999.lianjie FONT-SIZE: 12px; COLOR: #8080
4、80; TEXT-DECORATION: none.lianjie:hover FONT-SIZE: 12px.zzz FONT-SIZE: 12px; LINE-HEIGHT: 14px!-function MM_swapImgRestore() /v3.0var i,x,a=document.MM_sr; for(i=0;a&ia.length&(x=ai)&x.oSrc;i+) x.src=x.oSrc;function MM_preloadImages() /v3.0var d=document; if(d.images) if(!d.MM_p) d.MM_p=new Array();
5、var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i0&parent.frames.length) d=parent.framesn.substring(p+1).document; n=n.substring(0,p);if(!(x=dn)&d.all) x=d.alln; for (i=0;!x&id.forms.length;i+) x=d.formsin;for(i=0;!x&d.layers&id.layers.length;i+) x=MM_findObj(n,d.layersi.document);if(!x
6、 & document.getElementById) x=document.getElementById(n); return x;function MM_swapImage() /v3.0var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i倒计时源代码插入本机视频文件 插入网络视频文件嵌套页面代码 横向滚动条代码滚动条代码文字向上滚动条代码 欢迎你! 进入我的网站日历探秘! 亲爱的网友, 只要移动鼠标轻轻点击, 相信你会得到一些启示与收益! 最后更新时间用按钮链接网站的程序固定字号大小 去掉下划线
7、代码 10秒后自动链接到别的网页 表格代码行列表格一行 表格二行 表格一行二列 表格二行二列 表格四行二列 表格三行三列 首行居中后插入二行三列表格 前两列合并 右两行合并
8、 居中显示表格宽 width=80% 表格高 height=134 表格线条粗 border=1单元格边距 cellpadding=2单元格间距 cellspacing=0鼠标拖动数字时钟dCol=000000;/date colour.fCol=000000;/face colour.sCol=000000;/seconds colour.mCol=000000;/minutes colour.hCol=000000;/hours colour.ClockHeight=40;ClockWidth=40;ClockFromM
9、ouseY=0;ClockFromMouseX=100;/Alter nothing below! Alignments will be lost!d=new Array(SUNDAY,MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY);m=new Array(JANUARY,FEBRUARY,MARCH,APRIL,MAY,JUNE,JULY,AUGUST,SEPTEMBER,OCTOBER,NOVEMBER,DECEMBER);date=new Date();day=date.getDate();year=date.getYear();if
10、 (year 2000) year=year+1900;TodaysDate= +ddate.getDay()+ +day+ +mdate.getMonth()+ +year;D=TodaysDate.split();H=.;H=H.split();M=.;M=M.split();S=.;S=S.split();Face=1 2 3 4 5 6 7 8 9 10 11 12;font=Arial;size=1;speed=0.6;ns=(document.layers);ie=(document.all);Face=Face.split( );n=Face.length;a=size*10;y
11、mouse=0;xmouse=0;scrll=0;props=;props2=;Split=360/n;Dsplit=360/D.length;HandHeight=ClockHeight/4.5HandWidth=ClockWidth/4.5HandY=-7;HandX=-2.5;scrll=0;step=0.06;currStep=0;y=new Array();x=new Array();Y=new Array();X=new Array();for (i=0; i n; i+)yi=0;xi=0;Yi=0;Xi=0Dy=new Array();Dx=new Array();DY=new
12、 Array();DX=new Array();for (i=0; i D.length; i+)Dyi=0;Dxi=0;DYi=0;DXi=0if (ns)for (i=0; i D.length; i+)document.write(+props2+Di+);for (i=0; i n; i+)document.write(+props+Facei+);for (i=0; i S.length; i+)document.write(+Si+);for (i=0; i M.length; i+)document.write(+Mi+);for (i=0; i H.length; i+)doc
13、ument.write(+Hi+);if (ie)document.write();for (i=0; i D.length; i+)document.write(+props2+Di+);document.write();document.write();for (i=0; i n; i+)document.write(+props+Facei+);document.write();document.write();for (i=0; i H.length; i+)document.write(+Hi+);document.write();document.write();for (i=0;
14、 i M.length; i+)document.write(+Mi+);document.write()document.write();for (i=0; i S.length; i+)document.write(+Si+);document.write()(ns)?window.captureEvents(Event.MOUSEMOVE):0;function Mouse(evnt)ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;xmouse = (ns)?evn
15、t.pageX+ClockFromMouseX:event.x+ClockFromMouseX;(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;function ClockAndAssign()time = new Date ();secs = time.getSeconds();sec = -1.57 + Math.PI * secs/30;mins = time.getMinutes();min = -1.57 + Math.PI * mins/30;hr = time.getHours();hrs = -1.575 + M
16、ath.PI * hr/6+Math.PI*parseInt(time.getMinutes()/360;if (ie)Od.style.top=window.document.body.scrollTop;Of.style.top=window.document.body.scrollTop;Oh.style.top=window.document.body.scrollTop;Om.style.top=window.document.body.scrollTop;Os.style.top=window.document.body.scrollTop;for (i=0; i n; i+) v
17、ar F=(ns)?document.layersnsFace+i:ieFacei.style; F.top=yi + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180)+scrll; F.left=xi + ClockWidth*Math.cos(-1.0471 + i*Split*Math.PI/180); for (i=0; i H.length; i+) var HL=(ns)?document.layersnsHours+i:ieHoursi.style; HL.top=yi+HandY+(i*HandHeight)*Math.si
18、n(hrs)+scrll; HL.left=xi+HandX+(i*HandWidth)*Math.cos(hrs); for (i=0; i M.length; i+) var ML=(ns)?document.layersnsMinutes+i:ieMinutesi.style; ML.top=yi+HandY+(i*HandHeight)*Math.sin(min)+scrll; ML.left=xi+HandX+(i*HandWidth)*Math.cos(min); for (i=0; i S.length; i+) var SL=(ns)?document.layersnsSeconds+i:ieSecondsi.style; SL.top=yi+HandY+(i*HandHeight)*Math.sin(sec)+scrll; SL.left=xi+HandX+(i*HandWidth)*Math.cos(sec); for (i=0; i D.length; i+) var DL=(ns)?document.layersnsDate+i:ieDatei.style; DL.top=
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 周口高三数学试题及答案
- 2026年航空航天材料创新进展与市场前景报告
- 铍箔及铍合金箔2026年市场创新应用分析报告
- 2026年架空网设备创新行业报告
- 2026年链条行业产业链创新升级报告
- 2026年人工智能在制造业的创新发展报告
- 2026年预算法实施条例题库(含答案)
- 2026年浙江省丽水市辅警人员招聘考试题库(含答案)
- 2026年中国广告工艺制品市场调研及投资前景评估
- xx县生猪屠宰加工项目可行性研究报告
- 2025年入党积极分子发展对象考试试题(完整版)附答案详解
- 广西柳州、桂林、北海等市2027届高三上学期10月联考地理试卷(有答案)
- 2026新教材语文 19《航天员写给孩子的信》课件
- 6.1 友谊的真谛 课件(共24张)+内嵌视频
- 2025-2026学年九年级上学期期中考试化学试题(含答案)
- 《桥梁工程试验与检测》课件-地基基础承载力检测-1
- 移动式升降工作平台(登高车)安全管理培训课件
- 化疗药物配置及管理操作规程
- 阀门定位器培训
- (零模)南昌市2025年高三年级九月测试化学试卷(含答案)
- 2024年中国烟草公司招聘笔试真题
评论
0/150
提交评论