前往顾页
以后地位: 主页 > 收集编程 > Asp实例教程 >

网页设想简朴合用代码

时候:2010-06-03 20:36来源:知行网www.zhixing123.cn 编辑:麦田守望者

定制字体为“宋体12px”并去失落超链接的下横线
//在<HEAD>和</HEAD>之间拔出

<style type="text/css">
BODY { FONT-FAMILY: "宋体","tahoma"; FONT-SIZE: 12px}
TH { FONT-FAMILY: "宋体", "tahoma"; FONT-SIZE: 12px}
TD { FONT-FAMILY: "宋体", "tahoma"; FONT-SIZE: 12px}
<!--
a {text-decoration:none}
a:hover {color: red;text-decoration:none}
-->
</style>
插手保藏(页面)
<script language>
<!--
if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4))
{
document.write("<U><SPAN STYLE=color:blue;cursor:hand; onclick=window.external.AddFavorite(location.href, document.title);>将本页增加到保藏夹</SPAN></U>");
}
//-->
</script>
插手保藏(网站)
<a href="javascript:window.external.AddFavorite(http://onegreen.126.com, 绿色软件站)">将本站插手保藏夹</a>
设为首页
<a href=# onClick="this.style.behavior=url(#default#homepage);this.setHomePage
(http://onegreen.126.com);">将本站设为首页</a>
主动显现以后日期<式样: 2003年8月4日(礼拜一) >
<script language="javascript">
var
today=new Date();var strDate=(" "+today.getYear()+"年"+(today.getMonth()+1)+"月"+today.getDate()+"日");var n_day=today.getDay();switch(n_day)
{case 0:
{strDate=strDate+"(礼拜日)"
}break;case 1:
{strDate=strDate+"(礼拜一)"
}break;case 2:
{strDate=strDate+"(礼拜二)"
}break;case 3:
{strDate=strDate+"(礼拜三)"
}break;case 4:
{strDate=strDate+"(礼拜四)"
}break;case 5:
{strDate=strDate+"(礼拜五)"
}break;case 6:
{strDate=strDate+"(礼拜六)"
}break;case 7:
{strDate=strDate+"(礼拜日)"
}break;}document.write(strDate);
</script>
主动静态显现以后时候<式样:=>
上午8:51:09
<script>
function tick() {
var hours, minutes, seconds, xfile;
var intHours, intMinutes, intSeconds;
var today;
today = new Date();
intHours = today.getHours();
intMinutes = today.getMinutes();
intSeconds = today.getSeconds();
if (intHours == 0) {
hours = "12:";
xfile = "半夜";
} else if (intHours < 12) {
hours = intHours+":";
xfile = "上午";
} else if (intHours == 12) {
hours = "12:";
xfile = "中午";
} else {
intHours = intHours - 12
hours = intHours + ":";
xfile = "下午";
}
if (intMinutes < 10) {
minutes = "0"+intMinutes+":";
} else {
minutes = intMinutes+":";
}
if (intSeconds < 10) {
seconds = "0"+intSeconds+" ";
} else {
seconds = intSeconds+" ";
}
timeString = xfile+hours+minutes+seconds;
Clock.innerHTML = timeString;
window.setTimeout("tick();", 100);
}
window.onload = tick;
</script>
<div id="Clock" align="center" style="font-size: 12; color:#FFFF00"></div>

主动显现以后日期和时候<式样:2003年8月4日 礼拜一 8:41am >
<script>
<!---
today=new Date();
var hours = today.getHours();
var minutes = today.getMinutes();
var seconds = today.getSeconds();
var timeValue = "<FONT COLOR=#FFFF00>" + ((hours >12) ? hours -12 :hours); timeValue += ((minutes < 10) ? "<BLINK><FONT COLOR=#FFFF00>:</FONT></BLINK>0" : "<BLINK><FONT COLOR=#FFFF00>:</FONT></BLINK>") + minutes+"</FONT></FONT>";
timeValue += (hours >= 12) ? "<FONT COLOR=#FFFF00>pm</FONT>" : "<FONT COLOR=#FFFF00>am</FONT>";
function initArray(){
this.length=initArray.arguments.length
for(var i=0;i<this.length;i++)
this[i+1]=initArray.arguments }
var d=new initArray("<font color=#FFFF00>礼拜日","<font color=#FFFF00>礼拜一","<font color=#FFFF00>礼拜二","<font color=#FFFF00>礼拜三","<font color=#FFFF00>礼拜四","<font color=#FFFF00>礼拜五","<font color=#FFFF00>礼拜六"); document.write("<font color=#FFFF00><font color=#FFFF00>",today.getYear(),"<font color=#FFFF00>年","<font color=#FFFF00>",today.getMonth()+1,"<font color=#FFFF00>月","<font color=#FFFF00>",today.getDate(),"<font color=#FFFF00>日 </FONT>",d[today.getDay()+1]," ",timeValue);
//-->
</script>
主动显现主页最后更新日期<式样: 本页最后更新日期: 09/21/2002 23:39:17 >
<script>
<!--hide script from old browsers
document.write("本页最后更新日期: " + document.lastModified + "")
// end hiding -->
</script>
前往上一页
javascript:history.back();
页面主动跳转
在<head>和</head>之间插手以下代码:

<meta http-equiv="Refresh" content="30;URL=http://plugins.126.com">
页面主动革新
在<head>和</head>之间插手以下代码:
<meta http-equiv="refresh" content="30">

牢固背景图
在<head>和</head>之间插手以下代码:
<style type="text/css">
<!--
BODY
{
BACKGROUND-IMAGE: url(frames.gif);
BACKGROUND-REPEAT: no-repeat;
BACKGROUND-position: center;
BACKGROUND-ATTACHMENT: fixed;
}
-->
</style>
 

------分开线----------------------------
标签(Tag):网页设想 网站制作
------分开线----------------------------
保举内容
猜你感兴趣