語法展示::   http://home.graffiti.net/kshrgj/


請用IE6.0或更新版本觀看語法特效展示

將以下程式碼複製,貼在<body>及</body>標籤之間。

<form name="board">
<center>
<table BORDER CELLSPACING=0 CELLPADDING=0 COLS=3 BGCOLOR="#006699" >
<tr ALIGN=CENTER>
<td><input type=button value=" 1 "onClick="but1(); window.focus()"></td>
<td><input type=button value=" 2 "onClick="but2(); window.focus()"></td>
<td><input type=button value=" 3 "onClick="but3(); window.focus()"></td>
</tr>
<tr ALIGN=CENTER>
<td><input type=button value=" 4 "onClick="but4(); window.focus()"></td>
<td><input type=button value=" 5 "onClick="but5(); window.focus()"></td>
<td><input type=button value=" 6 "onClick="but6(); window.focus()"></td>
</tr>
<tr ALIGN=CENTER>
<td><input type=button value=" 7 "onClick="but7(); window.focus()"></td>
<td><input type=button value=" 8 "onClick="but8(); window.focus()"></td>
<td><input type=button value=" 9 "onClick="but9(); window.focus()"></td>
</tr>
<tr ALIGN=CENTER>
<td COLSPAN="3" height="35">
<center><table BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=2 WIDTH="100%" >
<tr>
<td ALIGN=CENTER WIDTH="50%"><input type=button value=" 0 "onClick="but0(); window.focus()"></td>
<td ALIGN=CENTER WIDTH="50%"><input type=button value="重撥"onClick="clearit(); window.focus()"></td>
</tr>
</table>
</center>
</td>
</tr>
<tr>
<td ALIGN=CENTER COLSPAN="3"><input type=text name=pn size="10"></td>
</tr>
</table>
</center>
</form>
<SCRIPT LANGUAGE="JavaScript">
var phone_num='';
var timerID = null;
var timerRunning = false;
function but1()
{
phone_num = phone_num + '1';
 chknum();
}
function but2()
{
 phone_num = phone_num + '2';
 chknum();
}
function but3()
{
 phone_num = phone_num + '3';
 chknum();
}
function but4()
{
 phone_num = phone_num + '4';
 chknum();
}
function but5()
{
 phone_num = phone_num + '5';
 chknum();
}
function but6()
{
 phone_num = phone_num + '6';
 chknum();
}
function but7()
{
 phone_num = phone_num + '7';
 chknum();
}
function but8()
{
 phone_num = phone_num + '8';
 chknum();
}
function but9()
{
 phone_num = phone_num + '9';
 chknum();
}
function but0()
{
 phone_num = phone_num + '0';
 chknum();
}
function chknum()
{
if (phone_num=="8888")     //設定密碼
 document.location="http://blog.pixnet.net/como0925" ;     //設定連結網址
if (phone_num=="5566")
 document.location="http://www.yahoo.com.tw";
if (phone_num=="1234")
 document.location="http://www.pchome.com.tw";

document.board.pn.value=phone_num;
}
function clearit()
{
 phone_num = "";
 document.board.pn.value=phone_num;
}
//-->
</script>

arrow
arrow
    全站熱搜

    紫蓮の翼 發表在 痞客邦 留言(0) 人氣()