返回列表 回復 發帖

Java Script 測試區 Java 分享

 ,  描述: 在這裡分享您的Java Script
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 編輯 ]
2

評分次數

  • shineboy09

  • 天一

天氣預報雨法[台灣適用]
<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>
時間月曆 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>
時間月曆 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>
滑鼠打圈字 --歡迎光臨*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 編輯 ]
附件: 您所在的用戶組無法下載或查看附件
滑鼠時鐘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 編輯 ]
附件: 您所在的用戶組無法下載或查看附件
陰影彩字 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 編輯 ]
附件: 您所在的用戶組無法下載或查看附件
浮動_拖動_可關閉告示板
<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>
漸層雙色告示板
<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>
分享 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>
個人資料告示板
<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>tvbnow@tvbnow.com
<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>
在底部的滾動論壇聲明
<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:tvbnow@tvbnow.com>聯絡我們</a>。☜</marquee>
比人按加到我的最愛和設為首頁
<a href="javascript:window.external.AddFavorite('網址','論壇個名')">加到我的最愛</a>

<a href="#" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('網址');">設為首頁</a>
線上交談板
聊天室語法 直接復制擺去你想要的版簡介就得
<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 編輯 ]
附件: 您所在的用戶組無法下載或查看附件
線上交談板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>
返回列表