Board logo

標題: Java Script 測試區 Java 分享 [打印本頁]

作者: julianneteng    時間: 2007-10-26 10:34 PM     標題: Java Script 測試區 Java 分享

http://lthung.org/index.php?action=test_html#in_center

Sample:
1奧運倒時
<div style="right: 10px; position: absolute; top: 20px">

<embed style="overflow:hidden;width:155px;height:37px" src="http://aw.awflasher.com/2008lite.swf" width="155" height="37" type="application/x-shockwave-flash"></embed></div>
2網頁標題
<script language="JavaScript1.2">
<!-- Begin

var message="TVBNOW論壇提供旅者信息及休閑娛樂資料等等…"     //specifys the title
var message=message+"          " //gives a pause at the end,1 space=1 speed unit, here I used 10 spaces@150 each = 1.5seconds.
i="0"                                 //declares the variable and sets it to start at 0
var temptitle=""                 //declares the variable and sets it to have no value yet.
var speed="150"                  //the delay in milliseconds between letters

function titler(){
if (!document.all&&!document.getElementById)
return
document.title=temptitle+message.charAt(i)  //sets the initial title
temptitle=temptitle+message.charAt(i)       //increases the title by one letter
i++                                            //increments the counter
if(i==message.length)                            //determines the end of the message
{
i="0"                                            //resets the counter at the end of the message
temptitle=""                                    //resets the title to a blank value
}
setTimeout("titler()",speed)                    //Restarts. Remove line for no-repeat.
}

window.onload=titler

// End -->
</script
[ 本帖最後由 z0012854 於 2009-3-11 09:57 AM 編輯 ]
作者: julianneteng    時間: 2007-10-26 10:53 PM

天氣預報雨法[台灣適用]
<img height="31" src="http://udn.com/WEATHER/IMAGES/taipeiicon.gif" width="38"/></td><td colspan="3">
<strong>
<a href="http://udn.com/WEATHER/taipei.htm" style="text-decoration: none">台北</a></strong></td></tr><tr><td>
<img height="13" src="http://udn.com/WEATHER/IMAGES/taipeilowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="http://udn.com/WEATHER/IMAGES/taipeihightemp.gif" width="27"/></td></tr>
<img height="31" src="http://udn.com/WEATHER/IMAGES/taichungicon.gif" width="38"/></td><td colspan="3">
<strong>
<a href="http://udn.com/WEATHER/taichung.htm" style="text-decoration: none">台中</a></strong></td></tr><tr><td>
<img height="13" src="http://udn.com/WEATHER/IMAGES/taichunglowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="http://udn.com/WEATHER/IMAGES/taichunghightemp.gif" width="27"/></td></tr>
<img height="31" src="http://udn.com/WEATHER/IMAGES/kaoshiungicon.gif" width="38"/></td><td colspan="3">
<strong>
<a href="http://udn.com/WEATHER/kaoshiung.htm" style="text-decoration: none">高雄</a></strong></td></tr><tr><td>
<img height="13" src="http://udn.com/WEATHER/IMAGES/kaoshiunglowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="http://udn.com/WEATHER/IMAGES/kaoshiunghightemp.gif" width="27"/></td></tr>
<img height="31" src="http://udn.com/WEATHER/IMAGES/taitungicon.gif" width="38"/></td><td colspan="3">
<strong>
<a style="text-decoration: none" href="http://udn.com/WEATHER/taitung.htm">台東</a></strong></td></tr><tr><td>
<img height="13" src="http://udn.com/WEATHER/IMAGES/taitunglowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="http://udn.com/WEATHER/IMAGES/taitunghightemp.gif" width="27"/></td></tr>
<img height="31" src="http://udn.com/WEATHER/IMAGES/jinmengicon.gif" width="38"/></td><td colspan="3">
<strong>
<a style="text-decoration: none" href="http://udn.com/WEATHER/jinmeng.htm">金門</a></strong></td></tr><tr><td>
<img height="13" src="http://udn.com/WEATHER/IMAGES/jinmenglowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="http://udn.com/WEATHER/IMAGES/jinmenghightemp.gif" width="27"/></td></tr>
<img height="31" src="http://udn.com/WEATHER/IMAGES/matsuicon.gif" width="38"/></td><td colspan="3">
<strong>
<a style="text-decoration: none" href="http://udn.com/WEATHER/matsu.htm">馬祖</a></strong></td></tr><tr><td>
<img height="13" src="http://udn.com/WEATHER/IMAGES/matsulowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="http://udn.com/WEATHER/IMAGES/matsuhightemp.gif" width="27"/></td></tr>
<img height="31" src="http://udn.com/WEATHER/IMAGES/penghuicon.gif" width="38"/></td><td colspan="3">
<strong>
<a style="text-decoration: none" href="http://udn.com/WEATHER/penghu.htm">澎湖</a></strong></td></tr><tr><td>
<img height="13" src="http://udn.com/WEATHER/IMAGES/penghulowtemp.gif" width="27"/></td><td>-</td> <td>
<img height="13" src="http://udn.com/WEATHER/IMAGES/penghuhightemp.gif" width="27"/></td></tr>

作者: julianneteng    時間: 2007-10-26 11:03 PM

時間月曆 1

各位好:早晨:午安:晚安、可加或改任何字句
.shd2 { color:red 是現在日期顏色
.shd3 { color:orange 是星期日之顏色
.shd4 { color:green 是星期六之顏色
color:white 是其餘日期及字句之顏色
background-color: black 是背景顏色
border-top-color:white; border-left-color:skyblue;
border-bottom-color: blue; border-right-color:yellow;
以上均是整體框邊四條邊可修改之顏色

TABLE cellSpacing=2 2是每一格之間距離
<style>
.shd {border-top-width: 1px;
border-top-style: solid;
border-top-color:white;
border-left-width: 1px;
border-left-style: solid;
border-left-color:skyblue;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: blue;
border-right-width: 1px;
border-right-style: solid;
border-right-color:yellow;
color:white ;font:9pt Verdana;
background-color: black}
.shd2 { color:red ;font:9pt Verdana; }
.shd3 { color:orange ;font:9pt Verdana; }
.shd4 { color:green ;font:9pt Verdana; }
</style>
<script language="JavaScript">
function greeting(){
var today = new Date();
var hrs = today.getHours();
document.writeln("<TABLE width=220 cellSpacing=2 cellPadding=2 class=shd>");
document.write("<tr><td COLSPAN=7 align=center class=shd>TVBNOW 論壇各位好:");
if (hrs < 6)
document.write("(Early) Morning");
else if (hrs < 12)
document.write("早晨!");
else if (hrs <= 18)
document.write("午安!");
else
document.write("晚安!");
document.writeln("<tr><td COLSPAN=7 align=center class=shd>");
dayStr = today.toLocaleString();
document.write(dayStr);
document.writeln("");}
function montharr(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11){
this[0] = m0;
this[1] = m1;
this[2] = m2;
this[3] = m3;
this[4] = m4;
this[5] = m5;
this[6] = m6;
this[7] = m7;
this[8] = m8;
this[9] = m9;
this[10] = m10;
this[11] = m11;}
function calendar(){
var m;
var today = new Date();
var thisDay;
var monthDays = new montharr(31, 28, 31, 30, 31, 30, 31, 31, 30,
31, 30, 31);
year = today.getYear();
thisDay = today.getDate();
if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
monthDays[1] = 29;
nDays = monthDays[today.getMonth()];
firstDay = today;
firstDay.setDate(1);
testMe = firstDay.getDate();
if (testMe == 2)
firstDay.setDate(0);
startDay = firstDay.getDay();
document.write("<TR><TD class=shd><FONT class=shd3>Sun<TD class=shd>Mon<TD class=shd>Tue<TD class=shd>Wed<TD class=shd>Thu<TD class=shd>Fri<TD class=shd><FONT class=shd4>Sat");
document.write("<TR>");
column = 0;
for (i=0; i<startDay; i++){
document.write("<TD>");
column++;}
for (i=1; i<=nDays; i++){
document.write("<TD class=shd>");
if (i == thisDay)
document.write("<FONT class=shd2>")
document.write(i);
if (i == thisDay)
document.write("")
column++;
if (column == 7){
document.write("<TR>");
column = 0;}}
document.write("</TABLE>");
document.writeln("");}
greeting();
document.write("");
calendar();
document.write("");
</script>

作者: julianneteng    時間: 2007-10-26 11:06 PM

時間月曆 2
各位好:早晨:午安:晚安、可加或改任何字句
.shd2 { color:red 是現在日期顏色
.shd3 { color:orange 是星期日之顏色
.shd4 { color:green 是星期六之顏色
color:white 是其餘日期及字句之顏色
background-color: black 是背景顏色
border-color:blue; 是框邊可修改之顏色
TABLE cellSpacing=2 2是每一格之間距離
<style>
.shd {style;border:1px dashed; border-color:blue;
color:white ;font:9pt Verdana;
background-color:black}
.shd2 { color:red ;font:9pt Verdana; }
.shd3 { color:orange ;font:9pt Verdana; }
.shd4 { color:green ;font:9pt Verdana; }
</style>
<script language="JavaScript">
function greeting(){
var today = new Date();
var hrs = today.getHours();
document.writeln("<TABLE width=220 cellSpacing=2 cellPadding=2 class=shd>");
document.write("<tr><td COLSPAN=7 align=center class=shd>TVBNOW 論壇 各位好:");
if (hrs < 6)
document.write("(Early) Morning");
else if (hrs < 12)
document.write("早晨!");
else if (hrs <= 18)
document.write("午安!");
else
document.write("晚安!");
document.writeln("<tr><td COLSPAN=7 align=center class=shd>");
dayStr = today.toLocaleString();
document.write(dayStr);
document.writeln("");}
function montharr(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11){
this[0] = m0;
this[1] = m1;
this[2] = m2;
this[3] = m3;
this[4] = m4;
this[5] = m5;
this[6] = m6;
this[7] = m7;
this[8] = m8;
this[9] = m9;
this[10] = m10;
this[11] = m11;}
function calendar(){
var m;
var today = new Date();
var thisDay;
var monthDays = new montharr(31, 28, 31, 30, 31, 30, 31, 31, 30,
31, 30, 31);
year = today.getYear();
thisDay = today.getDate();
if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
monthDays[1] = 29;
nDays = monthDays[today.getMonth()];
firstDay = today;
firstDay.setDate(1);
testMe = firstDay.getDate();
if (testMe == 2)
firstDay.setDate(0);
startDay = firstDay.getDay();
document.write("<TR><TD class=shd><FONT class=shd3>Sun<TD class=shd>Mon<TD class=shd>Tue<TD class=shd>Wed<TD class=shd>Thu<TD class=shd>Fri<TD class=shd><FONT class=shd4>Sat");
document.write("<TR>");
column = 0;
for (i=0; i<startDay; i++){
document.write("<TD>");
column++;}
for (i=1; i<=nDays; i++){
document.write("<TD class=shd>");
if (i == thisDay)
document.write("<FONT class=shd2>")
document.write(i);
if (i == thisDay)
document.write("")
column++;
if (column == 7){
document.write("<TR>");
column = 0;}}
document.write("</TABLE>");
document.writeln("");}
greeting();
document.write("");
calendar();
document.write("");
</script>

作者: julianneteng    時間: 2007-10-26 11:09 PM

滑鼠打圈字 --歡迎光臨*TVBNOW 論壇 Test must download txt
<SCRIPT LANGUAGE="JavaScript">
if (document.all) {
message = "歡迎光臨*TVBNOW 論壇 *";
Font = "細明體";
Color = "red";
Width = 90;
Height = 30;
step = 0.04;
message = message.split('');
L = message.length;
TrigSplit = 360 / L;
Sz = new Array()
ypos = 0;
xpos = 0;
currStep = 0;
document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">');for (i = 0; i < L; i++) {
document.write('<div id="ie" style="position:absolute;top:0px;left:0px;'
+'width:10px;height:10px;font-family:'+Font+';font-size:12px;'
+'color:'+Color+';text-align:center">'+message+'</div>');}
document.write('</div></div>');
function Mouse() {
ypos = event.y;
xpos = event.x - 5;}
document.onmousemove=Mouse;
function animate() {
outer.style.pixelTop = document.body.scrollTop;
for (i = 0; i < L; i++) {
ie.style.top = ypos + Height * Math.sin(currStep + i * TrigSplit * Math.PI / 180);
ie.style.left = xpos + Width * Math.cos(currStep + i * TrigSplit * Math.PI / 180);
Sz = ie.style.pixelTop - ypos;
if (Sz < 5) Sz = 5;
ie.style.fontSize = Sz / 1.7;}
currStep -= step;
setTimeout('animate()', 20);}
window.onload = animate;}
</script>


[ 本帖最後由 julianneteng 於 2007-10-27 06:52 AM 編輯 ]
作者: julianneteng    時間: 2007-10-26 11:37 PM

滑鼠時鐘Test must download txt
<SCRIPT language=javascript>
dCol='555555';  //  外圍旋轉日期顏色
fCol='blue';    //  十二小時顏色
sCol='red';     //  秒針顏色
mCol='000000';  //  分針顏色
hCol='00ff00';  //  時針顏色
ClockHeight=50;
ClockWidth=50;
ClockFromMouseY=80;
ClockFromMouseX=80;
d=new Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
m=new Array("一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月");

date=new Date();
day=date.getDate();
year=date.getYear();
if (year < 2000) year=year+1900;
TodaysDate=" "+d[date.getDay()]+" "+day+" "+m[date.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='verdana';   // 字型
size=2;
speed=0.6;
ns=(document.layers);
ie=(document.all);
Face=Face.split(' ');
n=Face.length;
a=size*10;
ymouse=0;
xmouse=0;
scrll=0;
props="<font style='font-family:"+font+";size:"+size+";color:"+fCol+"'>";
props2="<font style='font-family:"+font+";size:"+size+";color:"+dCol+"'>";
Split=360/n;
Dsplit=360/D.length;
HandHeight=ClockHeight/4.5
HandWidth=ClockWidth/4.5
HandY=-7;
HandX=-2.5;
scrll=0;
step=0.02;    //  外圍旋轉速度
currStep=0;
y=new Array();x=new Array();Y=new Array();X=new Array();
for (i=0; i < n; i++){y=0;x=0;Y=0;X=0}
Dy=new Array();Dx=new Array();DY=new Array();DX=new Array();
for (i=0; i < D.length; i++){Dy=0;Dx=0;DY=0;DX=0}
if (ns){for (i=0; i < D.length; i++)
document.write('<layer name="nsDate'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props2+D+'</font></center></layer>');
for (i=0; i < n; i++)
document.write('<layer name="nsFace'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props+Face+'</font></center></layer>');
for (i=0; i < S.length; i++)
document.write('<layer name=nsSeconds'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+sCol+'><center><b>'+S+'</b></center></font></layer>');
for (i=0; i < M.length; i++)
document.write('<layer name=nsMinutes'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+mCol+'><center><b>'+M+'</b></center></font></layer>');
for (i=0; i < H.length; i++)
document.write('<layer name=nsHours'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+hCol+'><center><b>'+H+'</b></center></font></layer>');
}if (ie){
document.write('<div id="Od" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < D.length; i++)
document.write('<div id="ieDate" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props2+D+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Of" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < n; i++)
document.write('<div id="ieFace" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props+Face+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Oh" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < H.length; i++)
document.write('<div id="ieHours" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+hCol+';text-align:center;font-weight:bold">'+H+'</div>');
document.write('</div></div>');
document.write('<div id="Om" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < M.length; i++)
document.write('<div id="ieMinutes" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+mCol+';text-align:center;font-weight:bold">'+M+'</div>');
document.write('</div></div>')
document.write('<div id="Os" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < S.length; i++)
document.write('<div id="ieSeconds" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+sCol+';text-align:center;font-weight:bold">'+S+'</div>');
document.write('</div></div>')}
(ns)?window.captureEvents(Event.MOUSEMOVE):0;
function  Mouse(evnt){
ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;
xmouse = (ns)?evnt.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 + Math.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++){
var F=(ns)?document.layers['nsFace'+i]:ieFace.style;
F.top=y + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180)+scrll;
F.left=x + ClockWidth*Math.cos(-1.0471 + i*Split*Math.PI/180);
}for (i=0; i < H.length; i++){
var HL=(ns)?document.layers['nsHours'+i]:ieHours.style;
HL.top=y+HandY+(i*HandHeight)*Math.sin(hrs)+scrll;
HL.left=x+HandX+(i*HandWidth)*Math.cos(hrs);
}for (i=0; i < M.length; i++){
var ML=(ns)?document.layers['nsMinutes'+i]:ieMinutes.style;
ML.top=y+HandY+(i*HandHeight)*Math.sin(min)+scrll;
ML.left=x+HandX+(i*HandWidth)*Math.cos(min);
}for (i=0; i < S.length; i++){
var SL=(ns)?document.layers['nsSeconds'+i]:ieSeconds.style;
SL.top=y+HandY+(i*HandHeight)*Math.sin(sec)+scrll;
SL.left=x+HandX+(i*HandWidth)*Math.cos(sec);
}for (i=0; i < D.length; i++){
var DL=(ns)?document.layers['nsDate'+i]:ieDate.style;
DL.top=Dy + ClockHeight*1.5*Math.sin(currStep+i*Dsplit*Math.PI/180)+scrll;
DL.left=Dx + ClockWidth*1.5*Math.cos(currStep+i*Dsplit*Math.PI/180);
}currStep-=step;
}function Delay(){
scrll=(ns)?window.pageYOffset:0;
Dy[0]=Math.round(DY[0]+=((ymouse)-DY[0])*speed);
Dx[0]=Math.round(DX[0]+=((xmouse)-DX[0])*speed);
for (i=1; i < D.length; i++){
Dy=Math.round(DY+=(Dy[i-1]-DY)*speed);
Dx=Math.round(DX+=(Dx[i-1]-DX)*speed);
}y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed);
x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed);
for (i=1; i < n; i++){
y=Math.round(Y+=(y[i-1]-Y)*speed);
x=Math.round(X+=(x[i-1]-X)*speed);
}ClockAndAssign();
setTimeout('Delay()',20);
}if (ns||ie)window.onload=Delay;
</SCRIPT>


[ 本帖最後由 julianneteng 於 2007-10-27 06:52 AM 編輯 ]
作者: julianneteng    時間: 2007-10-26 11:44 PM

陰影彩字 Test must download txt
<style>.spanstyle {position:absolute;visibility:visible;top:-50px;font-size:20pt;font-family:Verdana;filter:glow(color=white,strength=2)">}</style><BODY onload=javascript:pageonload()><SCRIPT language=javascript>
var message="歡迎光臨 TVBNOW 論壇 ";
var x,y;
var step=28;
var flag=0;message=message.split("");var xpos=new Array();for (i=0;i<=message.length-1;i++) {xpos=-50;}var ypos=new Array();
for (i=0;i<=message.length-1;i++) {ypos=-50;}function handlerMM(e) {x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX+20;y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY;flag=1;}function makesnake() {if (flag==1 && document.all) {for (i=message.length-1; i>=1; i--) {xpos=xpos[i-1]+step;ypos=ypos[i-1];}xpos[0]=x+step;ypos[0]=y;for (i=0; i<=message.length-1; i++) {var thisspan = eval("span"+(i)+".style");thisspan.posLeft=xpos;thisspan.posTop=ypos;thisspan.color=Math.random() * 255 * 255 * 255 + Math.random() * 255 * 255 + Math.random() * 255;}}else if (flag==1 && document.layers) {for (i=message.length-1; i>=1; i--) {xpos=xpos[i-1]+step;ypos=ypos[i-1];}xpos[0]=x+step;ypos[0]=y;for (i=0; i<message.length-1; i++) {var thisspan = eval("document.span"+i);thisspan.left=xpos;thisspan.top=ypos;thisspan.color=Math.random() * 255 * 255 * 255 + Math.random() * 255 * 255 + Math.random() * 255;}}}</SCRIPT><SCRIPT language=javascript> function pageonload() { makesnake(); window.setTimeout("pageonload();", 2); } </SCRIPT>
<SCRIPT language=javascript> for (i=0;i<=message.length-1;i++) { document.write("<span id=span"+i+" class=spanstyle>");
document.write(message); document.write("</span>"); } if (document.layers) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = handlerMM; </SCRIPT>



[ 本帖最後由 julianneteng 於 2007-10-27 06:53 AM 編輯 ]
作者: julianneteng    時間: 2007-10-26 11:56 PM

浮動_拖動_可關閉告示板
<div ID="floater" style="position:absolute; top:10px;right:10px">
<div id="tabledisplay" style="display:yes">
<table width="160" height="120" bgcolor="pink" cellpadding="2" cellspacing="1" border="0" title="按此可將告示板拖動">
<tr><td height="2" align="center" style="BACKGROUND-COLOR:#c6a3fe; color:white; font-size:10pt">
<a style="cursor:help" onclick="tabledisplay.style.display=tabledisplay.style.display=='none'?'':'none'">
<img src="http://lthung.org/pic/close.gif" alt="關閉" width="12" height="12" border="0" align="right"></a>
公告視窗</td></tr>
<tr><td style="text-align:center; BACKGROUND-COLOR:#ddfefe; color:green; font-size:10pt">

此處是打字的地方

</td></tr></table>
</div></div>
<script language="JavaScript">
self.onError=null;
currentX = currentY = 0;
whichIt = null;
lastScrollX = 0; lastScrollY = 0;
NS = (document.layers) ? 1 : 0;
IE = (document.all) ? 1: 0;
function heartBeat() {
if(IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; }
if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }
if(diffY != lastScrollY) {percent = .1 * (diffY - lastScrollY);
if(percent > 0) percent = Math.ceil(percent);
else percent = Math.floor(percent);                       
if(IE) document.all.floater.style.pixelTop += percent;
if(NS) document.floater.top += percent;
lastScrollY = lastScrollY + percent;}
if(diffX != lastScrollX) {
percent = .1 * (diffX - lastScrollX);
if(percent > 0) percent = Math.ceil(percent);
else percent = Math.floor(percent);
if(IE) document.all.floater.style.pixelLeft += percent;
if(NS) document.floater.left += percent;
lastScrollX = lastScrollX + percent;}
}function checkFocus(x,y) {
stalkerx = document.floater.pageX;
stalkery = document.floater.pageY;
stalkerwidth = document.floater.clip.width;
stalkerheight = document.floater.clip.height;
if( (x > stalkerx && x < (stalkerx+stalkerwidth)) && (y > stalkery && y < (stalkery+stalkerheight))) ;
else return false;
}function grabIt(e) {
if(IE) {
whichIt = event.srcElement;
while (whichIt.id.indexOf("floater") == -1) {
whichIt = whichIt.parentElement;
if (whichIt == null) { return true; }}
whichIt.style.pixelLeft = whichIt.offsetLeft;
whichIt.style.pixelTop = whichIt.offsetTop;
currentX = (event.clientX + document.body.scrollLeft);
currentY = (event.clientY + document.body.scrollTop);
} else {
window.captureEvents(Event.MOUSEMOVE);
if(checkFocus (e.pageX,e.pageY)) {
whichIt = document.floater;
StalkerTouchedX = e.pageX-document.floater.pageX;
StalkerTouchedY = e.pageY-document.floater.pageY;
}}return true;}
function moveIt(e) {
if (whichIt == null) { return false; }
if(IE) {
newX = (event.clientX + document.body.scrollLeft);
newY = (event.clientY + document.body.scrollTop);
distanceX = (newX - currentX);
distanceY = (newY - currentY);currentX = newX;currentY = newY;
whichIt.style.pixelLeft += distanceX;
whichIt.style.pixelTop += distanceY;
if(whichIt.style.pixelTop < document.body.scrollTop) whichIt.style.pixelTop = document.body.scrollTop;       
if(whichIt.style.pixelLeft < document.body.scrollLeft) whichIt.style.pixelLeft = document.body.scrollLeft;
if(whichIt.style.pixelLeft > document.body.offsetWidth - document.body.scrollLeft - whichIt.style.pixelWidth - 20) whichIt.style.pixelLeft = document.body.offsetWidth - whichIt.style.pixelWidth - 20;
if(whichIt.style.pixelTop > document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5) whichIt.style.pixelTop = document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5;
} else {
whichIt.moveTo(e.pageX-StalkerTouchedX,e.pageY-StalkerTouchedY);
if(whichIt.left < 0+self.pageXOffset) whichIt.left = 0+self.pageXOffset;
if(whichIt.top < 0+self.pageYOffset) whichIt.top = 0+self.pageYOffset;
if( (whichIt.left + whichIt.clip.width) >= (window.innerWidth+self.pageXOffset-17)) whichIt.left = ((window.innerWidth+self.pageXOffset)-whichIt.clip.width)-17;
if( (whichIt.top + whichIt.clip.height) >= (window.innerHeight+self.pageYOffset-17)) whichIt.top = ((window.innerHeight+self.pageYOffset)-whichIt.clip.height)-17;}}
function dropIt() {
whichIt = null;
if(NS) window.releaseEvents ;
return false;}
if(NS) {
window.onmousedown = grabIt;
window.onmousemove = moveIt;
window.onmouseup = dropIt;}
if(IE) {
document.onmousedown = grabIt;
document.onmousemove = moveIt;
document.onmouseup = dropIt;}
if(NS || IE) action = window.setInterval("heartBeat()",1);
</script>

作者: julianneteng    時間: 2007-10-26 11:58 PM

漸層雙色告示板
<table width="240" height="120" bgcolor="0000dd">
<td height="10"><font size="2" color="white"><center>公告視窗
<tr><td align=center style="filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr='#ffffff', endColorStr='blue', gradientType='0')">
<font size=2 color=white>

此處是打字的地方

</td></table>

作者: julianneteng    時間: 2007-10-27 12:16 AM

分享 Java 轉動公告
<table style="border:1px solid #777777;" bgcolor="yellow">
<td>
<marquee scrollamount='1' scrolldelay='60' direction= 'up' width='300' id=xiaoqing height='120' onmouseover=xiaoqing.stop() onmouseout=xiaoqing.start()>
<20/10>滾動公告版、些許功能,例:TVBNOW 論壇 » 硬件技術問題解答 » 『技術文章共享』 » 發新話題等等
</marquee>
</td>
</table>

作者: julianneteng    時間: 2007-10-27 12:21 AM

個人資料告示板
<style>
.top{font-size:11pt;color:#ffffff;background:#ff99ff}
.pat1{font-size:10pt;color:#b845fe;background:#ffccff}
.pat2{font-size:10pt;color:#b845fe;background:#ffe1fb}
.color{color:purple}
</style>
<table width="400" border="1" cellpadding="1" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="purple">
<tr><td align="center" class="top">
♠ ♣ ♥ 個 人 資 料 ♥ ♣ ♠
<table width="100%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="purple">
<tr>
<td class="pat2"><font class="color">網名:</font>TVBNOW
<td class="pat2"><font class="color">電郵:</font>[email protected]
<tr>
<td class="pat1"><font class="color">性別:</font>男生
<td class="pat1"><font class="color">網站:</font>http://www.tvbnow.com
<tr>
<td class="pat2"><font class="color">姓名:</font>不便公開
<td class="pat2"><font class="color">ICQ:</font>123456789
<tr>
<td class="pat1"><font class="color">生日:</font>9004年 13月 32日
<td class="pat1"><font class="color">星座:</font>白羊 - 天蠍 - 水瓶座
<tr>
<td class="pat2"><font class="color">娛樂:</font>看書、看海、作詩
<td class="pat2"><font class="color">興趣:</font>彈琴、整網、讀書
<tr>
<td class="pat1"><font class="color">喜愛食品:</font>食得是福
<td class="pat1"><font class="color">喜愛偶像:</font>總之是人類
<tr>
<td class="pat2"><font class="color">喜歡顏色:</font>紅橙黃綠青藍紫
<td class="pat2"><font class="color">喜歡卡通:</font>任何卡通人物
</td></table>
</td></tr></table>

作者: julianneteng    時間: 2007-10-27 01:18 AM

在底部的滾動論壇聲明
<marquee scrollamount='1' scrolldelay='60' direction= 'up' width='300' id=xiaoqing height='30' onmouseover=xiaoqing.stop() onmouseout=xiaoqing.start<fieldset style="line-height:180%;FONT-SIZE: 11px; WIDTH: 700; FONT-FAMILY: Tahoma, Arial" align="center"> <legend align="center"><strong> </strong><font color="#FF6600"><strong>TVBNOW論壇重要聲明</strong></font></a></legend>    ☞本站只是一個自由的討論區,一切留言之言論只代表留言者個人意見,並非本網站之立場,用戶不應信賴內容,並應自行判斷內容之真實性,而本站以即時上載留言的方式運作,TVBNOW論壇對所有留言的真實性、完整性及立場等,不負任何法律責任,由於本討論區受到「即時上載留言」運作方式所規限,故不能完全監察所有留言,若讀者發現有留言出現問題,請<a href=mailto:[email protected]>聯絡我們</a>。☜</marquee>

作者: julianneteng    時間: 2007-10-27 01:21 AM

比人按加到我的最愛和設為首頁
<a href="javascript:window.external.AddFavorite('網址','論壇個名')">加到我的最愛</a>

<a href="#" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('網址');">設為首頁</a>

作者: julianneteng    時間: 2007-10-27 01:25 AM

線上交談板
聊天室語法 直接復制擺去你想要的版簡介就得
<script type="text/javascript">
var zoomsun_wc_cfg = {};
zoomsun_wc_cfg.barBG="http://say-on.com/webchat/images/barbg-6.png";
zoomsun_wc_cfg.language="zh-tw";
zoomsun_wc_cfg.width="450";
zoomsun_wc_cfg.height="300";

function _getNickName(){
zoomsun_wc_cfg.lastLoad=true;
var un = "";
var obj = document.getElementById("creditlist");
if(obj){
un = obj.innerHTML.replace(/<.*>(.*)<.*>/g,"$1");
}else{
var nspan = null;
var lnks = document.links;
for(var i=0;i<lnks.length;i++){
if(lnks.href.search(/(logging.*action=logout|logout\.)/ig)!=-1){
nspan = lnks.parentNode.previousSibling;
while(nspan && nspan.tagName!="LI"){
nspan = nspan.previousSibling;
}
if(nspan){
un = nspan.innerHTML;
}
if(!un){un = "";} else {un=un.replace(/(:|\s| )/g,"").replace(/<.*>([^<].*[^>])<.*>/g,"$1");}
break;
}
}
}
if( un == "") un = "_auto";
return un;


}
zoomsun_wc_cfg.user = _getNickName();

</script>
<SCRIPT src="http://say-on.com/webchat/embed_webchat.js" id="WebChatScript" website="www.tvbnow.com" bgColor="#808080"  winTitle="TVBNOW在線交談"  minText="TVBNOW在線交談"  bOpen="true" bPreview="true" bminiMode="false"  bStatic="false"  type=text/javascript></SCRIPT>
[ 本帖最後由 julianneteng 於 2007-10-27 01:28 AM 編輯 ]
作者: julianneteng    時間: 2007-10-27 01:30 AM

線上交談板2
<script type="text/javascript">
var zoomsun_wc_cfg = {};

function _getNickName(){
zoomsun_wc_cfg.lastLoad=true;
var un = "";
var obj = document.getElementById("creditlist");
if(obj){
un = obj.innerHTML.replace(/<.*>(.*)<.*>/g,"$1");
}else{
var nspan = null;
var lnks = document.links;
for(var i=0;i<lnks.length;i++){
if(lnks.href.search(/(logging.*action=logout|logout\.)/ig)!=-1){
nspan = lnks.parentNode.previousSibling;
while(nspan && nspan.tagName!="LI"){
nspan = nspan.previousSibling;
}
if(nspan){
un = nspan.innerHTML;
}
if(!un){un = "";} else {un=un.replace(/(:|\s| )/g,"").replace(/<.*>([^<].*[^>])<.*>/g,"$1");}
break;
}
}
}
if( un == "") un = "_auto";
return un;


}
zoomsun_wc_cfg.user = _getNickName();

</script>
<SCRIPT src="http://say-on.com/webchat/embed_webchat.js" id="WebChatScript" website="www.tvbnow.com" bgColor="#FF9933"  winTitle="TVBNOW在線聊天室"  minText="与同时访问此页的网友交谈"  bOpen="true" bPreview="true" bminiMode="false"  bStatic="false"  type=text/javascript></SCRIPT>

作者: julianneteng    時間: 2007-10-27 01:51 AM

你的網址Logo加透明flash
<EMBED style="LEFT: 5px; POSITION: absolute; TOP: 0px; " align=right src=你的flash網址 width=1024 height=300 right:0 type=application/x-shockwave-flash wmode="transparent" quality="hig">
sample
<EMBED style="LEFT: 5px; POSITION: absolute; TOP: 0px; " align=right src=http://imgfree.21cn.com/free/flash/30.swf width=1024 height=300 right:0 type=application/x-shockwave-flash wmode="transparent" quality="hig">
flash網址:
http://imgfree.21cn.com/free/flash/14.swf

http://imgfree.21cn.com/free/flash/20.swf

http://ys168.91.tc/flash/2.swf

http://imgfree.21cn.com/free/flash/1.swf紅色背景白色小飛星

http://imgfree.21cn.com/free/flash/2.swf淺綠色背景明亮的顏色垂直的小條

http://imgfree.21cn.com/free/flash/3.swf光球光芒時常出現并且消失

http://imgfree.21cn.com/free/flash/4.swf米字符星光

http://imgfree.21cn.com/free/flash/5.swf悲觀的背景米字符星光

http://imgfree.21cn.com/free/flash/6.swf灰藍色背景柔和地落雨珠

http://imgfree.21cn.com/free/flash/7.swf腐蝕背景飛星閃耀

http://imgfree.21cn.com/free/flash/8.swf青蛙

http://imgfree.21cn.com/free/flash/10.swf垂直的小條箭頭

http://imgfree.21cn.com/free/flash/11.swf寬度垂直的小條

關於http://imgfree.21cn.com/free/flash/12.swf岩石垂直的小條

http://imgfree.21cn.com/free/flash/13.swf黑背景旋轉的輪子盤

旋轉,與老鼠白光小組一起的http://imgfree.21cn.com/free/flash/14.swf蝌蚪

http://imgfree.21cn.com/free/flash/15.swf黑背景綠色飄帶幻覺圖像

http://imgfree.21cn.com/free/flash/16.swf黑背景飛星閃耀

http://imgfree.21cn.com/free/flash/17.swf金魚


http://imgfree.21cn.com/free/flash/18.swf藍色顏色背景水平的箭

關於http://imgfree.21cn.com/free/flash/19.swf岩石垂直的小條

http://imgfree.21cn.com/free/flash/20.swf黑背景強度閃動橫條

http://imgfree.21cn.com/free/flash/21.swf黑背景光暈

http://imgfree.21cn.com/free/flash/22.swf開口由輕微地增加

http://imgfree.21cn.com/free/flash/23.swf藍色顏色背景雪花浮動

關於http://imgfree.21cn.com/free/flash/24.swf閃光垂直的小條

http://imgfree.21cn.com/free/flash/25.swf三隻黑螞蟻

關於http://imgfree.21cn.com/free/flash/26.swf晃動黃色,綠色,藍色垂直線

http://imgfree.21cn.com/free/flash/27.swf無色的背景水下落

http://imgfree.21cn.com/free/flash/28.swf黑背景垂直的小條

http://imgfree.21cn.com/free/flash/29.swf圈子內地海波動

http://imgfree.21cn.com/free/flash/30.swf黑背景藍色顏色幻覺

http://imgfree.21cn.com/free/flash/30.swf黑背景藍色顏色幻覺

http://imgfree.21cn.com/free/flash/31.swf黑背景無數的小明亮斑點柔和地落

http://imgfree.21cn.com/free/flash/32.swf長的頭髮女孩

http://imgfree.21cn.com/free/flash/33.swf粉末黃色5瓣花浮動

http://imgfree.21cn.com/free/flash/34.swf

http://imgfree.21cn.com/free/flash/35.swf小,大星光暈幻覺

http://imgfree.21cn.com/free/flash/35.swf紫色嘴唇印度登高

關於http://imgfree.21cn.com/free/flash/36.swf閃光橫條

http://imgfree.21cn.com/free/flash/37.swf在天空中綠化,黃色葉子舞蹈

http://imgfree.21cn.com/free/flash/38.swf飛星飛行秋天

http://imgfree.21cn.com/free/flash/39.swf小+字符旋轉大開口

http://imgfree.21cn.com/free/flash/40.swf大,柔和小八個瓣雪花秋天

http://imgfree.21cn.com/free/flash/41.swf紫色背景大,柔和小八個瓣雪花秋天

http://imgfree.21cn.com/free/flash/42.swf空中振翼黃色球

http://imgfree.21cn.com/free/flash/43.swf

http://imgfree.21cn.com/free/flash/44.swf

http://imgfree.21cn.com/free/flash/45.swf二隻腐蝕蝴蝶在天空中在頂面左手角落跳舞

hermosa桃紅色雲彩群http://imgfree.21cn.com/free/flash/46.swf片斷

關於http://imgfree.21cn.com/free/flash/47.swf箭頭反覆穿梭

http://imgfree.21cn.com/free/flash/48.swf光球慢慢地飛行入從權利

http://imgfree.21cn.com/free/flash/49.swf柔和地下跌hermosa桃紅色花瓣

寫美好的親吻天的http://imgfree.21cn.com/free/flash/50.swf岩石

http://imgfree.21cn.com/free/flash/51.swf三舞蹈在天空中蜻蜓,閃耀星光

http://imgfree.21cn.com/free/flash/52.swf黑背景柔和地落紅色葉子

http://imgfree.21cn.com/free/flash/53.swf冰淇凌著陸

http://imgfree.21cn.com/free/flash/54.swf綠色心臟和我?你垂直的著陸

http://imgfree.21cn.com/free/flash/55.swf二躍遷青蛙

http://imgfree.21cn.com/free/flash/56.swf六角形,登陸的垂直的小條

http://imgfree.21cn.com/free/flash/57.swf鱍科和水泡

http://imgfree.21cn.com/free/flash/58.swf光暈,開口

http://imgfree.21cn.com/free/flash/59.swf藍色顏色背景高昂海鷗

http://imgfree.21cn.com/free/flash/60.swf黑背景著陸螢火蟲

http://imgfree.21cn.com/free/flash/61.swf騰飛黨忠誠

http://imgfree.21cn.com/free/flash/188.swf 星星

http://imgfree.21cn.com/free/flash/186.swf 萤火虫

http://imgfree.21cn.com/free/flash/185.swf 美女心

http://imgfree.21cn.com/free/flash/184.swf 美女车

http://imgfree.21cn.com/free/flash/183.swf 中国婚礼
[ 本帖最後由 julianneteng 於 2007-10-28 01:08 AM 編輯 ]
作者: julianneteng    時間: 2007-10-27 03:26 AM

mouse右鍵無效,highlight無效
<!--- begin --->
<body onselectstart="return false;" ondragstart="return false;" oncontextmenu="return false;">
<!--- end --->
[ 本帖最後由 julianneteng 於 2007-10-27 03:28 AM 編輯 ]
作者: julianneteng    時間: 2007-10-27 03:31 AM

按右鍵會彈出警告
<!--- begin  --->
<script language="javascript">
if (navigator.appName.indexOf("Internet Explorer") != -1)
document.onmousedown = noSourceExplorer;
function noSourceExplorer(){if (event.button == 2 |
event.button == 10){alert(" 你想幹什麼 ")
;}}</script>
<!--- end  --->

作者: julianneteng    時間: 2007-10-27 03:33 AM

right click會開新視窗
<!--- begin  --->
<script language=javascript>
function click(){
if(event.button==2){earthquake()
alert("你想幹什麼")
window.open("http://kkx3.com")
;}
}document.onmousedown=click
function earthquake(){
window.moveTo(1000,5000)
}
</script>
<!--- end  --->

作者: julianneteng    時間: 2007-10-27 03:42 AM

輸入密碼(方法1)
例子(預設密碼:tvbnow)
輸入密碼錯誤三次後,
會回到上一頁
<!-- begin  -->
<SCRIPT LANGUAGE="JavaScript">
function password() {
var testV = 1;


//在引號內設置密碼提示
var pass1 = prompt("please enter the password.");


while (testV < 3) {
if (!pass1)
history.go(-1);


//在引號內設置密碼
if (pass1 == "tvbnow") {


//在引號內設置輸入正確後的顯示訊息
alert("yeah! welcome to TVBNOW.");


break;
}
testV+=1;
var pass1 =


//在引號內設置輸入錯誤後的顯示訊息
prompt("please enter the password again.");


}
if (pass1!="password" & testV ==3)
history.go(-1);
return " ";
}
document.write(password());
</SCRIPT>
<!-- end   -->

作者: julianneteng    時間: 2007-10-27 03:47 AM

輸入密碼(方法2)
例子(預設密碼:tvbnow)
輸入密碼錯誤後,
會到指定的網頁
<!-- begin  -->
<script LANGUAGE="JavaScript">

//在引號內設置密碼提示
var p = prompt("Please enter the password.")

//在引號內設置密碼
if (p == "tvbnow"){


}
else {

//在引號內設置錯誤後進入的網頁位置
self.location = "http://tvbnow.com"


}
</script>
<!-- end  -->

作者: julianneteng    時間: 2007-10-27 03:56 AM

功能表(下拉式)
<select><option selected>請問美女</option><option>哪裡人?</option><option>幾歲?</option><option>身高?體重?</option><option>有沒男朋友?</option></select>

作者: julianneteng    時間: 2007-10-27 04:09 AM

  時鐘1
<embed src="http://www.clocklink.com/clocks/trans007-black.swf?TimeZone=CCT&"  width="150" height="150" wmode="transparent" type="application/x-shockwave-flash">
[ 本帖最後由 julianneteng 於 2007-10-27 04:42 AM 編輯 ]
作者: julianneteng    時間: 2007-10-27 04:11 AM

  時鐘
<embed src="http://www.clocklink.com/clocks/8002-red.swf?TimeZone=AWST&"  width="150" height="150" wmode="transparent" type="application/x-shockwave-flash">
[ 本帖最後由 julianneteng 於 2007-10-27 04:42 AM 編輯 ]
作者: julianneteng    時間: 2007-10-27 04:13 AM

  時鐘3
<embed src="http://www.clocklink.com/clocks/2004-white.swf?TimeZone=CCT&"  width="150" height="150" wmode="transparent" type="application/x-shockwave-flash">
[ 本帖最後由 julianneteng 於 2007-10-27 04:41 AM 編輯 ]
作者: julianneteng    時間: 2007-10-27 04:49 AM

Yahoo! 字典
<table border="0" cellpadding=3 cellspacing="0">
  <tr>
    <td colspan="2"><img src="http://hk.yimg.com/i/header/v7dic.gif"></td>
  </tr>
  <form action="http://hk.dictionary.yahoo.com/search.html" name="dictsearch" onSubmit="return verify_dictinput(this)">
    <tr>
      <td>
        <input type="text" name="s" maxlength=60 size="18">
      </td>
      <td>
        <input type="submit" name="Submit" value=" 查字 " class="ysbtn1" />
      </td>
    </tr>
  </form>
</table>

作者: julianneteng    時間: 2007-10-27 05:10 AM

新聞快報語法..最新版...
美化語法,不支緩firefox....這個比較PC home 即時新聞..好好多
<center><fieldset style=width:300> <legend><font color=#28797C><b>ToDay 新聞快報</b></font></legend><br><iframe src="http://www.ettoday.com/common/ticker.htm" width=450 height=18 marginwidth=0 marginheight=0 scrolling=no frameborder=0></iframe></fieldset> </center>

作者: julianneteng    時間: 2007-10-27 05:40 AM

右鍵只鎖圖片[test must download txt file]
<SCRIPT Language="JavaScript">
var clickmessage="想要圖 自己找 求求你"
function disableclick(e) {if (document.all) {if (event.button==2||event.button==3) {if (event.srcElement.tagName=="IMG"){alert(clickmessage);
return false;}}}if (document.layers) {if (e.which == 3) {alert(clickmessage);return false;}}}function associateimages(){for(i=0;i<document.images.length;i++)document.images.onmousedown=disableclick;}if (document.all)document.onmousedown=disableclick
else if (document.layers)associateimages()</SCRIPT>



[ 本帖最後由 julianneteng 於 2007-10-27 06:48 AM 編輯 ]
作者: julianneteng    時間: 2007-10-27 05:51 AM

可選歌之音樂盒 此音樂盒可放 midi 及 mp3
<bgsound id=bs><select  name="select" class="w" size="1"style="background-color:skyblue">
<option>選首你喜歡的音樂</option>
<option value="網址">歌名
<option value="網址">歌名
</select>
每加一首音樂 在適當位置加以下

 <option value="網址">歌名

作者: julianneteng    時間: 2007-10-27 05:54 AM

支援音樂及 MV 多格式隨機選曲播放器   [test must download txt file]
進入時自動隨機播放
同一曲會不停循環播放
以下試聽之音樂及 MV 格式包括
MP3 wma wmv asf asx 不支援 r m

color: red ; font:10pt ; background: yellow
以上是播放器中可設定之背景色及文字色
.music1:這行設定停止播放背景色及文字色
.music2:這行設定隨機播放背景色及文字色
.music3:這行設定選曲背景色及文字色
var total = 5 這行是歌曲總數、加音樂必需增加
Name[4] 及 URL[4] 歌名及網址部份。自行增加
<STYLE>
.music1 { color:red; font:10pt; background:yellow }
.music2 { color:blue; font:10pt; background:skyblue }
.music3 { color:#ffffff; font:10pt; background:black }
</STYLE>
<SCRIPT language=javascript>
var total = 5
var URL        = new Array(total)
var Name= new Array(total)

Name[0]="歌曲或影片名稱";
Name[1]="歌曲或影片名稱";
Name[2]="歌曲或影片名稱";
Name[3]="歌曲或影片名稱";
Name[4]="歌曲或影片名稱";

URL[0]="歌曲或影片網址";
URL[1]="歌曲或影片網址";
URL[2]="歌曲或影片網址";
URL[3]="歌曲或影片網址";
URL[4]="歌曲或影片網址";

var  i,j
document.write('<form name=midi><a id=replace></a>')
document.write('<br><select name=midi_s onchange=ms() class=music3>')
for( j=0 ; j<total ; j++ )
document.write('<option value='+j+'>'+Name[j]+'</option>')
document.write('<option value='+(j+1)+' class=music1>==== 停止播放 ====</option>')
document.write('<option value='+(j+2)+' class=music2>==== 隨機播放 ====</option>')
document.write('</select>')
ra()
function ra(){
i=document.midi.midi_s.selectedIndex=Math.floor(Math.random()*(total));
ms()}function ms(){
i = document.midi.midi_s.selectedIndex;
switch(i){case total+1:
ra();
break;
case total:
replace.innerHTML = "";
break;
default:
replace.innerHTML = '<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="application/x-oleobject" width="350" height="280" align="middle" standby="Loading Microsoft?Windows?Media Player components..." id="MediaPlayer1"><param name="transparentAtStart" value="True"><param name="transparentAtStop" value="True"><param name="AnimationAtStart" value="Ture"><param name="AutoStart" value="True"><param name="loop" value="-1"><param name="AutoRewind" value="true"><param name="DisplaySize" value="0"><param name="AutoSize" value="false"><param name="ShowDisplay" value="false"><param name="ShowStatusBar" value="ture"><param name="ShowControls" value="ture"><param name="FileName" value="'+URL+'"><param name="Volume" value="0"></object>'
break;}}
document.write('</form>')
</script>


[ 本帖最後由 julianneteng 於 2007-10-27 06:50 AM 編輯 ]
作者: julianneteng    時間: 2007-10-27 07:30 AM

最新可爱钟表在线时间免费代码
<iframe scrolling="no" frameborder="0" width="180" height="200" src="http://www.xise.cn/qita/zhong/clock.htm" allowtransparency="true"></iframe>

作者: julianneteng    時間: 2007-10-27 11:06 PM

以下有三款框架分割之語法。可供參考使用
<html>
<head>
<META HTTP-EQUIV="content-type" C>
<title>例如;TVBNOW 論壇</title>
</head>

<FRAMESET COLS="*,130" frameborder="YES" border="0">
<frame name="main2" src="http://os.tvbnow.com/thread-182652-1-1.html"><!--左邊檔名>
<frame name="main1" src="http://os.tvbnow.com"><!--右邊選項檔名>
</frameset>

<script language='javascript'>postamble();</script>
</html>
<html>
<head>
<META HTTP-EQUIV="content-type" C>
<title>例如;TVBNOW 論壇</title>
</head>

<FRAMESET rows="100,*" frameborder="yes" border="0">
<frame name="main1" src="http://os.tvbnow.com"><!--上邊選項檔名>
<frame name="main2" src="http://os.tvbnow.com/thread-182652-1-1.html"><!--下邊檔名>
</frameset>
</html>
<html>
<head>
<META HTTP-EQUIV="content-type" C>
<title>例如;TVBNOW 論壇</title>
</head>

<FRAMESET rows="*,100" frameborder="yes" border="0">
<frame name="main2" src="http://os.tvbnow.com/thread-182652-1-1.html"><!--上邊檔名>
<frame name="main1" src="http://os.tvbnow.com"><!--下邊選項檔名>
</frameset>
</html>
[ 本帖最後由 julianneteng 於 2007-10-27 11:12 PM 編輯 ]
作者: julianneteng    時間: 2007-10-27 11:25 PM

隨機背景置中
pic[5]="圖片網址" 想加圖要順序增加多一行
pic[0] ..... pic[1] ..... pic[5] ..... pic[6] ..... Array(6) 6是總數有多少幅圖 ( 不可有錯 ) 語法中最底部 background-position: 50% 50% 50% 50% 是控制圖片顯示位置、可修改 若設定為 background-position: 0% 0% 則是升到、最高、最左。如此類推
<script language=javascript>
var pic=new Array(6)
pic[0]="http://os.tvbnow.com/images/default/toppp_2007.png"
pic[1]="http://os.tvbnow.com/images/default/toppp_2007.png"
pic[2]="http://os.tvbnow.com/images/default/toppp_2007.png"
pic[3]="http://os.tvbnow.com/images/default/toppp_2007.png"
pic[4]="http://os.tvbnow.com/images/default/toppp_2007.png"
pic[5]="http://os.tvbnow.com/images/default/toppp_2007.png"

var newdate=new Date()
var getpic=newdate.getSeconds()%pic.length
document.write('<STYLE>')
document.write('body{ background-image: url('+pic[getpic]+');')
document.write(' background-repeat: no-repeat; ')
document.write('background-attachment: fixed; ')
document.write('background-position: 50% 50% }')
document.write('</STYLE>')
</script>

作者: julianneteng    時間: 2007-10-27 11:32 PM

每小時問候句
最頂第一行
font size=4 是字型大小
第五行 COLOR:blue 是字顏色
所有中文字句中、可改寫喜歡的字句
<font size=4>
<script language=JavaScript>
var today = new Date ()
var hours = today.getHours();
document.write( "<font color=blue face='新細明體'>");
if (hours <=0) document.write("午夜 12 點多了,晚安");
else if (hours <= 1) document.write("午夜 1 點多了");
else if (hours <= 2) document.write("午夜 2 點丫");
else if (hours <= 3) document.write("已經午夜 3 點多了");
else if (hours <= 4) document.write("已經午夜 4 點多了");
else if (hours <= 5) document.write("早ㄚ! 5 點多了");
else if (hours <= 6) document.write("早ㄚ!6 點多了");
else if (hours <= 7) document.write("早ㄚ!已7 點多了");
else if (hours <= 8) document.write("上午 8 點多了");
else if (hours <= 9) document.write("上午 9 點多了");
else if (hours <= 10) document.write("上午 10 點");
else if (hours <= 11) document.write("上午 11 點多了");
else if (hours <= 12) document.write("中午 12 點");
else if (hours <= 13) document.write("下午 1 點");
else if (hours <= 14) document.write("下午 2 點喇");
else if (hours <= 15) document.write("下午 3 點丫");
else if (hours <= 16) document.write("下午 4 點");
else if (hours <= 17) document.write("下午 5 點");
else if (hours <= 18) document.write("下午 6 點多了");
else if (hours <= 19) document.write("晚上 7 點多了");
else if (hours <= 20) document.write("晚上 8 點了歡迎光臨 ");
else if (hours <= 21) document.write("晚上 9 點了歡迎光臨 ");
else if (hours <= 22) document.write("晚上 10 點了歡迎光臨 ");
else if (hours <= 23) document.write("晚上 11 點了歡迎光臨 ");
</script></font>

作者: julianneteng    時間: 2007-10-27 11:36 PM

可用於留言之用〔大地震〕
但這語法、可能會令人討厭
願各位使用時、請三思
按一按、大地震、可改任何字句
<input type=button value=按一按大地震 onclick=javascript:{for(index=0;index<50;index++){i=Math.random()*50;parent.window.moveTo(i,0);parent.window.moveTo(-i,0);parent.window.moveTo(0,i);parent.window.moveTo(0,-i);parent.window.moveTo(i,i);parent.window.moveTo(i,-i);parent.window.moveTo(-i,i);parent.window.moveTo(-i,-i);parent.window.moveTo(0,0);}}>

作者: julianneteng    時間: 2007-10-27 11:37 PM

小型地震
一進入,可感覺之地震
<script>
function shake(n) {
if (self.moveBy){
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
}} } }shake(5);</script>

作者: julianneteng    時間: 2007-10-27 11:39 PM

滑鼠指一指 字會變大
<FONT STYLE="cursor='hand'"onMouseover = "this.size=15"onmouseout = "this.size=3">~滑鼠移過來指指先~
TVBNOW 論壇~</FONT>

作者: julianneteng    時間: 2007-10-27 11:41 PM

偷龍轉鳳
<滑鼠指一指,會變另一句說話
〔TVBNOW 論壇〕改自己想打之說話
<h2><span onmouseover=this.innerText="TVBNOW論壇"><h3>~把滑鼠移過來指指先丫~</h3></span></h2>
[ 本帖最後由 julianneteng 於 2007-10-27 11:44 PM 編輯 ]
作者: julianneteng    時間: 2007-10-27 11:47 PM

波浪飄語法
width=400 height=300 是控制飄的闊及高度
<marquee direction=down behavior=alternate width=400 height=300><marquee direction=right behavior=alternate >TVBNOW論壇</marquee></marquee>

作者: julianneteng    時間: 2007-10-27 11:49 PM

兩邊有字色及底色 向外
width="200" 底色之闊度
bgcolor= 是字之底色
請在各 color= 中之位置改改顏色
<marquee bgcolor="BLACK" direction="left" width="200"><font color="WHITE" size="5">TVBNOW論壇</marquee><marquee bgcolor="WHITE"direction="right" width="200"><font color="BLACK" size="5">TVBNOW論壇</marquee>
[ 本帖最後由 julianneteng 於 2007-10-27 11:50 PM 編輯 ]
作者: julianneteng    時間: 2007-10-27 11:56 PM

滑鼠指變字
font:18pt 是字型大小
color:red 是文字顏色
font-family:標楷體 可自訂字體
TVBNOW論壇~Java分享 改為指向顯示的字句
~把滑鼠移過來指指先丫~ 是開始及滑鼠離開顯示字句
<span style="font:18pt;color:red;font-family:標楷體" onmouseover=this.innerText="TVBNOW論壇~Java分享" onmouseout=this.innerText="~把滑鼠移過來指指先丫~">~把滑鼠移過來指指先丫~</span>
[ 本帖最後由 julianneteng 於 2007-10-27 11:57 PM 編輯 ]
作者: julianneteng    時間: 2007-10-28 01:11 AM

推薦幾款滑鼠特效代碼

<BODY style='cursor:url(http://top88.91.tc/sb/01-3.cur)'>

<BODY style='cursor:url(http://top88.91.tc/sb/01.ani)'>

<BODY style='cursor:url(http://top88.91.tc/sb/02.ani)'>

<BODY style='cursor:url(http://top88.91.tc/sb/01-3.cur)'>

<BODY style='cursor:url(http://top88.91.tc/sb/22.ani)'>

<BODY style='cursor:url(http://top88.91.tc/sb/24.ani)'>

<BODY style='cursor:url(http://top88.91.tc/sb/20.ani)'>

<BODY style='cursor:url(http://top88.91.tc/sb/21.ani)'>

<BODY style='cursor:url(http://top88.91.tc/sb/23.ani)'>

<BODY style='cursor:url(http://top88.91.tc/sb/mmdj.ani)'>

<BODY style='cursor:url(http://top88.91.tc/sb/wsz.ani)'>

作者: julianneteng    時間: 2007-10-28 01:13 AM

計算標準身材
<td><font color="#FF0000" size="5"><script
language="JAVASCRIPT">
<!-- hide this script tag's contents from old browsers
function ClearForm(form){
form.weight.value = "";
form.height.value = "";
form.bmi.value = "";
form.my_comment.value = "";
}
function bmi(weight, height) {
bmindx=weight/eval(height*height);
return bmindx;
}
function checkform(form) {
if (form.weight.value==null||form.weight.value.length==0 || form.height.value==null||form.height.value.length==0){
alert("\n請輸入你的身高體重好嗎?");
return false;
}
else if (parseFloat(form.height.value) <= 40||
parseFloat(form.height.value) >=300||
parseFloat(form.weight.value) <=10||
parseFloat(form.weight.value) >=250){
alert("\n不要鬧了啦!你是怪物啊! \n再鬧.小心我扁你!");
ClearForm(form);
return false;
}
return true;
}
function computeform(form) {
if (checkform(form)) {
yourbmi=Math.round(bmi(form.weight.value, form.height.value/100));
form.bmi.value=yourbmi;
if (yourbmi >40) {
form.my_comment.value="恐龍?,快去看醫生!";
}
else if (yourbmi >30 && yourbmi <=40) {
form.my_comment.value="嗯...或許日本的相撲適合你,我也不知該說甚麼了?";
}
else if (yourbmi >27 && yourbmi <=30) {
form.my_comment.value="你很重喔,早晨跑2000公尺,睡前做500個伏地挺身!!";
}
else if (yourbmi >22 && yourbmi <=27) {
form.my_comment.value="超出標準了,多運動,控制一下飲食吧.祝福你!";
}
else if (yourbmi >=21 && yourbmi <=22) {
form.my_comment.value="真羨慕你.繼續保持下去!最佳女(男)主角換你做做看!!";
}
else if (yourbmi >=18 && yourbmi <21) {
form.my_comment.value="未達標準體重,多吃點對你才有好處.加油!";
}
else if (yourbmi >=16 && yourbmi <18) {
form.my_comment.value="哇!小心餓死.快去吃些高熱量的食物!";
}
else if (yourbmi <16) {
form.my_comment.value="皮包骨了,建議你去掛急診並長期住院 ";
}
}
return;
}
// -- done hiding from old browsers -->
</script></font></td>
</tr>
</table>
</center></div>

<div align="center"><center>

<table border="0">
<tr>
<td><table border="0" cellspacing="1" width="100%"
bgcolor="#00CCFF">
<tr>
<td valign="top"><form method="POST" name="BMI">
<p>身高(公分)<input type="text" size="5"
name="height"
><br>
體重(公斤)<input type="text" size="5"
name="weight"
><br>
<input type="button" value="開始診斷"
><br>
指數<input type="text" size="5" name="bmi"><br>
診斷結果<input type="text" size="45"
name="my_comment"></p>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center></div>

作者: julianneteng    時間: 2007-10-28 01:15 AM

特定日期問候語  Test must download txt file

放在你想放的位
此特效會在1月1日、12月25日以及每逢星期日彈出訊息
<script language="JavaScript">
<!--
today=new Date();
function initArray(){
this.length=initArray.arguments.length
for(var i=0;i<this.length;i++)
this[i+1]=initArray.arguments }
var d=new initArray("星期日", "星期一","星期二", "星期三","星期四", "星期五", "星期六");
month=today.getMonth()+1;
date=today.getDate();
day=d[today.getDay()+1];
if (day =="星期日"){
alert("今天是星期日,\n有沒有出去玩ㄚ?");
}
if (month==12 && date==25){
alert("今日是一個重要的日子\n因為...今天是\n聖誕節!");
}
if (month==1 && date==1){
alert("新年快樂!");
}
-->
</script>


[ 本帖最後由 julianneteng 於 2007-10-28 01:17 AM 編輯 ]
作者: julianneteng    時間: 2007-10-28 01:20 AM

(仿廣告)右上角加圖
<div style="position: absolute; right: 20px; top: 35px"> <img src="http://os.tvbnow.com/images/avatars/09.gif"></div>

作者: julianneteng    時間: 2007-10-28 01:32 AM

女性月经安全期查询免费代码
<iframe scrolling="no" frameborder="0" width="400" height="450" src="http://www.xise.cn/qita/nxaq/" allowtransparency="true"></iframe>

作者: julianneteng    時間: 2007-10-28 01:37 AM

  來訪時間曰期
<SCRIPT Language="VBScript">
sub window_onLoad()
msgBox "歡迎光臨您進站的日期是: " & date
msgBox "歡迎光臨您進站的時間是: " & time
end sub
</SCRIPT>
[ 本帖最後由 julianneteng 於 2007-10-28 01:38 AM 編輯 ]
作者: julianneteng    時間: 2007-10-28 01:42 AM

在滑鼠上顯示十字線。
<script language="JavaScript1.2">
if (document.all&&!window.print){leftright.style.width=document.body.clientWidth-1
topdown.style.height=document.body.clientHeight-1
}else if (document.layers){
document.leftright.clip.width=window.innerWidth
document.leftright.clip.height=1
document.topdown.clip.width=1
document.topdown.clip.height=window.innerHeight
}function followmouse1(){//move cross engine for IE 4+
leftright.style.pixelTop=document.body.scrollTop+event.clientY+1
topdown.style.pixelTop=document.body.scrollTop
if (event.clientX<document.body.clientWidth-1)
topdown.style.pixelLeft=document.body.scrollLeft+event.clientX+1
else
topdown.style.pixelLeft=document.body.clientWidth-1
}function followmouse2(e){
//move cross engine for NS 4+
document.leftright.top=e.y+1
document.topdown.top=pageYOffset
document.topdown.left=e.x+1
}if (document.all)document.onmousemove=followmouse1
else if (document.layers){window.captureEvents(Event.MOUSEMOVE)
window.onmousemove=followmouse2}function regenerate(){window.location.reload()}function regenerate2(){setTimeout("window.onresize=regenerate",400)}if ((document.all&&!window.print)||document.layers)//if the user is using IE 4 or NS 4, both NOT IE 5+
window.onload=regenerate2
</script><style>#leftright, #topdown{position:absolute;
left:0;top:0;width:2px;height:2px;layer-background-color:no;
background-color:hotpink;
z-index:100;font-size:1px;}</style><div id="leftright" style="width:expression(document.body.clientWidth-1)"></div><div id="topdown" style="height:expression(document.body.clientHeight-1)"></div>

作者: julianneteng    時間: 2007-10-28 01:47 AM

停留秒數
<SPAN STYLE='WIDTH:400;FONT-SIZE:12pt;COLOR:blue;filter:Glow(Color=white,Strength=10)'>
<form name="d">您已經停留了 <input style="font-size:10pt" type="text" size="6" name="d2"> 秒</form></font>
<SCRIPT Language="JavaScript">
var milisec=0
var seconds=0
document.d.d2.value='0'
function display(){
if (milisec>=9){
milisec=0
seconds+=1}else
milisec+=1
document.d.d2.value=seconds+"."+milisec
setTimeout("display()",100)
}display()</SCRIPT></SPAN>

作者: julianneteng    時間: 2007-10-28 01:50 AM

日曆,農民曆 must download txt file
<script language="JavaScript">
<!--
function CalConv() {
        FIRSTYEAR = 1998;
        LASTYEAR = 2031;
        today = new Date();
        SolarYear = today.getFullYear();
        SolarMonth = today.getMonth() + 1;
        SolarDate = today.getDate();
        Weekday = today.getDay();
        LunarCal = [
  new tagLunarCal( 27,  5, 3, 43, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1 ),
  new tagLunarCal( 46,  0, 4, 48, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1 ),
  new tagLunarCal( 35,  0, 5, 53, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1 ),
  new tagLunarCal( 23,  4, 0, 59, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),
  new tagLunarCal( 42,  0, 1,  4, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),
  new tagLunarCal( 31,  0, 2,  9, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0 ),
  new tagLunarCal( 21,  2, 3, 14, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1 ),
  new tagLunarCal( 39,  0, 5, 20, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1 ),
  new tagLunarCal( 28,  7, 6, 25, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1 ),
  new tagLunarCal( 48,  0, 0, 30, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1 ),
  new tagLunarCal( 37,  0, 1, 35, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1 ),
  new tagLunarCal( 25,  5, 3, 41, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1 ),
  new tagLunarCal( 44,  0, 4, 46, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1 ),
  new tagLunarCal( 33,  0, 5, 51, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),
  new tagLunarCal( 22,  4, 6, 56, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ),
  new tagLunarCal( 40,  0, 1,  2, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ),
  new tagLunarCal( 30,  9, 2,  7, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1 ),
  new tagLunarCal( 49,  0, 3, 12, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1 ),
  new tagLunarCal( 38,  0, 4, 17, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0 ),
  new tagLunarCal( 27,  6, 6, 23, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1 ),
  new tagLunarCal( 46,  0, 0, 28, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0 ),
  new tagLunarCal( 35,  0, 1, 33, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0 ),
  new tagLunarCal( 24,  4, 2, 38, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),
  new tagLunarCal( 42,  0, 4, 44, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 ),
  new tagLunarCal( 31,  0, 5, 49, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0 ),
  new tagLunarCal( 21,  2, 6, 54, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1 ),
  new tagLunarCal( 40,  0, 0, 59, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1 ),
  new tagLunarCal( 28,  6, 2,  5, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0 ),
  new tagLunarCal( 47,  0, 3, 10, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1 ),
  new tagLunarCal( 36,  0, 4, 15, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1 ),
  new tagLunarCal( 25,  5, 5, 20, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0 ),
  new tagLunarCal( 43,  0, 0, 26, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1 ),
  new tagLunarCal( 32,  0, 1, 31, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0 ),
  new tagLunarCal( 22,  3, 2, 36, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0 ) ];
SolarCal = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];
SolarDays = [
  0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365, 396,
  0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366, 397 ];
        AnimalIdx = ["馬", "羊", "猴", "雞", "狗", "豬", "鼠", "牛", "虎", "兔", "龍", "蛇" ];
        LocationIdx = [ "南", "東", "北", "西" ];
        if ( SolarYear <= FIRSTYEAR || SolarYear > LASTYEAR ) return 1;
        sm = SolarMonth - 1;
        if ( sm < 0 || sm > 11 ) return 2;
        leap = GetLeap( SolarYear );
        if ( sm == 1 )
                d = leap + 28;
        else
                d = SolarCal[sm];
        if ( SolarDate < 1 || SolarDate > d ) return 3;
        y = SolarYear - FIRSTYEAR;
        acc = SolarDays[ leap*14 + sm ] + SolarDate;
        kc = acc + LunarCal[y].BaseKanChih;
        Kan = kc % 10;
        Chih = kc % 12;
        Location = LocationIdx[kc % 4];
        Age = kc % 60;
        if ( Age < 22 )
                Age = 22 - Age;
        else
                Age = 82 - Age;
        Animal = AnimalIdx[ Chih ];
        if ( acc <= LunarCal[y].BaseDays ) {
                y--;
                LunarYear = SolarYear - 1;
                leap = GetLeap( LunarYear );
                sm += 12;
                acc = SolarDays[leap*14 + sm] + SolarDate;
         }
        else
                LunarYear = SolarYear;
        l1 = LunarCal[y].BaseDays;
        for ( i=0; i<13; i++ ) {
                l2 = l1 + LunarCal[y].MonthDays + 29;
                if ( acc <= l2 ) break;
                l1 = l2;
         }
        LunarMonth = i + 1;
        LunarDate = acc - l1;
        im = LunarCal[y].Intercalation;
        if ( im != 0 && LunarMonth > im ) {
                LunarMonth--;
                if ( LunarMonth == im ) LunarMonth = -im;
         }
        if ( LunarMonth > 12 ) LunarMonth -= 12;
today=new Date();
        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=RED>星期日</font>","<font color=#8000FF>星期一</font>","<font color=#8000FF>星期二</font>","<font color=#8000FF>星期三</font>","<font color=#8000FF>星期四</font>","<font color=#8000FF>星期五</font>","<font color=GREEN>星期六</font>");
             document.write("<font style='color: black;font: 13px;font-family: Verdana;'>西元<font color=#3171b7> ",today.getYear()," </font>年<font color=#3171b7> ",today.getMonth()+1," </font>月<font color=#3171b7> ",today.getDate()," </font>日 | "
        ,d[today.getDay()+1],"");
          document.write( "<br>農曆<font color=#3171b7> " + LunarMonth + " </font>月<font color=#3171b7> " + LunarDate + " </font>日" );
       document.write( " | <font color=RED>煞</font>" + Location + " | <font color=GREEN>沖</font>" + Animal + " | <font color=GREEN>" +  Age + " </font>歲</font>" );
return 0;
}
function GetLeap( year ) {
   if ( year % 400 == 0 )
     return 1;
   else if ( year % 100 == 0 )
     return 0;
   else if ( year % 4 == 0 )
     return 1;
   else
     return 0;
}
function tagLunarCal( d, i, w, k, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13) {
this.BaseDays = d;
this.Intercalation = i;
this.BaseWeekday = w;
this.BaseKanChih = k;
this.MonthDays = [ m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13 ];
}
//-->
CalConv();
</script>


[ 本帖最後由 julianneteng 於 2007-10-28 01:53 AM 編輯 ]




歡迎光臨 公仔箱論壇 (http://www2.tvboxnow.com/) Powered by Discuz! 7.0.0