?? 825text4.htm
字號:
<html>
<head>
<title>可調節的輸出形式</title>
<style type="text/css">
<!--
body { font-family: "宋體"; font-size: 9pt; margin-top: 0px; margin-left: 0px; margin-right: 0px}
A { COLOR: black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none }
A:hover { COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline }
a:active { font: 9pt "宋體"; cursor: hand; color: #FF0033 }
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#fef4d9" onload=scroll()>
<br>
<br>
<center><font color=red face="隸書" size=6>可調節的輸出形式</font></center>
<br>
<center>
<table border=5 bordercolor=blue borderlight=green>
<tr><td align=center><font size=5 color=red face="Arial, Helvetica, sans-serif"><strong>下面為效果顯示區!</strong></font></td></tr>
<tr><td align=center> <SCRIPT>
var msg = "javascript歡迎你的光臨!!!"
var x = ""
num = 1
toggle = 1
tt = 1
OOK = 0
timval = 60
var tval = ""
function switcha() {
if (document.myform.dowhat.value == "開始/結束" )
tval = "向前/向后"
if (document.myform.dowhat.value == "向前/向后")
tval = "變快/變慢"
if (document.myform.dowhat.value == "變快/變慢")
tval = "開始/結束"
document.myform.dowhat.value = tval
}
function switcha2() {
if (document.myform.dowhat.value == "開始/結束" ) toggla()
if (document.myform.dowhat.value == "向前/向后" ) csd()
if (document.myform.dowhat.value == "變快/變慢" ) fasl()
}
function fasl() { timval = (timval==60 ? 150 : 60 ) }
function csd() {
tt = ( tt==1 ? 0 : 1)
}
function scroll() {
if (tt==1)
if (num <= msg.length)
OOK = 1
if (tt==0)
if (num >= 0)
OOK = 1
if ( OOK == 1)
{
OOK = 0
x = msg.substring(0,num)
document.myform.scroll.value = x
num = ( tt==1 ? num+1 : num-1 )
}
else
{
x = ""
document.myform.scroll.value = ""
num = (tt==1 ? 0 : msg.length )
}
if (toggle == 1)
setTimeout("scroll()", timval)
}
function toggla() {
toggle = (toggle == 1 ? 0 : 1 )
if (toggle == 1) scroll()
}
</SCRIPT>
<FORM NAME="myform">
<INPUT TYPE="text" NAME="scroll" SIZE=&{msg.length + 2}; ><br>
<INPUT TYPE="button" VALUE="運行" onClick="switcha2()">
<INPUT TYPE="text" NAME="dowhat" SIZE = 10 VALUE = "開始/結束">
<INPUT TYPE="button" VALUE="下一種" onClick="switcha()" >
</FORM>
</td></tr>
</table></center>
<br>
<br>
<center>
<textarea name=source rows=12 cols=45 class=yk9>
腳本說明:
第一步:把如下代碼加入<body>區域中
<SCRIPT>
var msg = "javascript歡迎你的光臨!!!"
var x = ""
num = 1
toggle = 1
tt = 1
OOK = 0
timval = 60
var tval = ""
function switcha() {
if (document.myform.dowhat.value == "Start/Stop" )
tval = "Forward/Backward"
if (document.myform.dowhat.value == "Forward/Backward")
tval = "Fast/Slow"
if (document.myform.dowhat.value == "Fast/Slow")
tval = "Start/Stop"
document.myform.dowhat.value = tval
}
function switcha2() {
if (document.myform.dowhat.value == "Start/Stop" ) toggla()
if (document.myform.dowhat.value == "Forward/Backward" ) csd()
if (document.myform.dowhat.value == "Fast/Slow" ) fasl()
}
function fasl() { timval = (timval==60 ? 150 : 60 ) }
function csd() {
tt = ( tt==1 ? 0 : 1)
}
function scroll() {
if (tt==1)
if (num <= msg.length)
OOK = 1
if (tt==0)
if (num >= 0)
OOK = 1
if ( OOK == 1)
{
OOK = 0
x = msg.substring(0,num)
document.myform.scroll.value = x
num = ( tt==1 ? num+1 : num-1 )
}
else
{
x = ""
document.myform.scroll.value = ""
num = (tt==1 ? 0 : msg.length )
}
if (toggle == 1)
setTimeout("scroll()", timval)
}
function toggla() {
toggle = (toggle == 1 ? 0 : 1 )
if (toggle == 1) scroll()
}
</SCRIPT>
<FORM NAME="myform">
<INPUT TYPE="text" NAME="scroll" SIZE=&{msg.length + 2}; ><br>
<INPUT TYPE="button" VALUE="Do It" onClick="switcha2()">
<INPUT TYPE="text" NAME="dowhat" SIZE = 10 VALUE = "Start/Stop">
<INPUT TYPE="button" VALUE="next" onClick="switcha()" >
</FORM>
第二步:把如下代碼加入<body>區域中
<body bgcolor="#fef4d9" onload=scroll()>
</textarea>
<SCRIPT LANGUAGE="JavaScript">
<!-- hide
function goHist(a)
{
history.go(a);
}
//-->
</script>
<FORM METHOD="post">
<INPUT TYPE="button" VALUE="返回" onClick="goHist(-1)" style="background-color: #8000FF; color: rgb(255,255,255)">
</form>
</center>
<br>
<br>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -