当前位置: 代码迷 >> Web前端 >> 网页奇效:日历,设为首页,加入收藏
  详细解决方案

网页奇效:日历,设为首页,加入收藏

热度:137   发布时间:2012-11-08 08:48:11.0
网页特效:日历,设为首页,加入收藏


1.日历



<SCRIPT LANGUAGE=JavaScript TYPE=text/JavaScript>
//datetime
today=new Date();
function initArray(){
this.length=initArray.arguments.length
for(var i=0;i<this.length;i++)
this[i+1]=initArray.arguments[i] }
var d=new initArray(
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六");
document.write(
"<font color=#000000 style='font-size:9pt;font-family: 宋体'> ",
today.getYear(),"年",
today.getMonth()+1,"月",
today.getDate(),"日 ",
d[today.getDay()+1],
"</font>" );
</SCRIPT>



2.设为首页

<span onclick="var strHref=window.location.href;this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.xuewaihui.com');" style="CURSOR: hand">设置为首页</span>



3.加入收藏

<span style="CURSOR: hand" onClick="window.external.addFavorite('http://www.helpor.net','网页特效集锦')" title="网页特效集锦">收藏本站</span>