⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 miscled.htm

📁 JavaScript特效(新)这里有许多的JAVA特效.供学者参考
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<HTML>

<HEAD>

<TITLE> LED Sign </TITLE>

</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#000080" ALINK="#000080">



<CENTER><H3>LED Sign</H3></CENTER>

<SCRIPT LANGUAGE="JavaScript">



<!--



// set messages (specify backslash in double form (i.e, \\)

var messages = new Array()

messages[0] = "welcome to my page"

messages[1] = "cool led sign eh"

messages[2] = "you can add a lot.."

messages[3] = "of messages to this."





// number of milliseconds to pause between two messages

var pause = 3000



// set normal spacing between two characters (no whitespace inbetween)

var space = 1



// set height width of each character

var height = 5

var width = 3



// create object of all supported characters in font

var letters = new letterArray()



// initialize image variables

var on = new Image(5, 5)

var off = new Image(5, 5)



// set image URLs

on.src = "on.gif"

off.src = "off.gif"



// get number of images already laid out in page

var imageNum = document.images.length



// compute width of board

//var boardWidth = longest * (width + space) - space



// set maximum message length in images

var boardWidth = 0

for (var i = 0; i < messages.length; ++i) {

        var lengthWithNoSpaces = messages[i].split(" ").join("").length

        var numberOfSpaces = messages[i].length - lengthWithNoSpaces

        var currentBoardWidth = lengthWithNoSpaces * (width + space) - space + numberOfSpaces * space * 2

        if (boardWidth < currentBoardWidth)

                boardWidth = currentBoardWidth

}



// sign is currently not running

var running = false

var timerID = null



function letterArray() {

        this.a = new Array(height)

        this.a[0] = " * "

        this.a[1] = "* *"

        this.a[2] = "***"

        this.a[3] = "* *"

        this.a[4] = "* *"



        this.b = new Array(height)

        this.b[0] = "** "

        this.b[1] = "* *"

        this.b[2] = "** "

        this.b[3] = "* *"

        this.b[4] = "** "



        this.c = new Array(height)

        this.c[0] = "***"

        this.c[1] = "*  "

        this.c[2] = "*  "

        this.c[3] = "*  "

        this.c[4] = "***"



        this.d = new Array(height)

        this.d[0] = "** "

        this.d[1] = "* *"

        this.d[2] = "* *"

        this.d[3] = "* *"

        this.d[4] = "** "



        this.e = new Array(height)

        this.e[0] = "*** "

        this.e[1] = "*  "

        this.e[2] = "***"

        this.e[3] = "*  "

        this.e[4] = "***"



        this.f = new Array(height)

        this.f[0] = "***"

        this.f[1] = "*  "

        this.f[2] = "***"

        this.f[3] = "*  "

        this.f[4] = "*  "



        this.g = new Array(height)

        this.g[0] = "***"

        this.g[1] = "*  "

        this.g[2] = "***"

        this.g[3] = "* *"

        this.g[4] = "***"



        this.h = new Array(height)

        this.h[0] = "* *"

        this.h[1] = "* *"

        this.h[2] = "***"

        this.h[3] = "* *"

        this.h[4] = "* *"



        this.i = new Array(height)

        this.i[0] = "***"

        this.i[1] = " * "

        this.i[2] = " * "

        this.i[3] = " * "

        this.i[4] = "***"



        this.j = new Array(height)

        this.j[0] = "  *"

        this.j[1] = "  *"

        this.j[2] = "  *"

        this.j[3] = "* *"

        this.j[4] = "***"

        

        this.k = new Array(height)

        this.k[0] = "* *"

        this.k[1] = "* *"

        this.k[2] = "** "

        this.k[3] = "* *"

        this.k[4] = "* *"



        this.l = new Array(height)

        this.l[0] = "*  "

        this.l[1] = "*  "

        this.l[2] = "*  "

        this.l[3] = "*  "

        this.l[4] = "***"



        this.m = new Array(height)

        this.m[0] = "* *"

        this.m[1] = "***"

        this.m[2] = "***"

        this.m[3] = "* *"

        this.m[4] = "* *"



        this.n = new Array(height)

        this.n[0] = "* *"

        this.n[1] = "***"

        this.n[2] = "***"

        this.n[3] = "***"

        this.n[4] = "* *"



        this.o = new Array(height)

        this.o[0] = "***"

        this.o[1] = "* *"

        this.o[2] = "* *"

        this.o[3] = "* *"

        this.o[4] = "***"



        this.p = new Array(height)

        this.p[0] = "** "

        this.p[1] = "* *"

        this.p[2] = "** "

        this.p[3] = "*  "

        this.p[4] = "*  "



        this.q = new Array(height)

        this.q[0] = "***"

        this.q[1] = "* *"

        this.q[2] = "* *"

        this.q[3] = "***"

        this.q[4] = "***"



        this.r = new Array(height)

        this.r[0] = "** "

        this.r[1] = "* *"

        this.r[2] = "** "

        this.r[3] = "* *"

        this.r[4] = "* *"



        this.s = new Array(height)

        this.s[0] = "***"

        this.s[1] = "*  "

        this.s[2] = "***"

        this.s[3] = "  *"

        this.s[4] = "***"



        this.t = new Array(height)

        this.t[0] = "***"

        this.t[1] = " * "

        this.t[2] = " * "

        this.t[3] = " * "

        this.t[4] = " * "



        this.u = new Array(height)

        this.u[0] = "* *"

        this.u[1] = "* *"

        this.u[2] = "* *"

        this.u[3] = "* *"

        this.u[4] = "***"



        this.v = new Array(height)

        this.v[0] = "* *"

        this.v[1] = "* *"

        this.v[2] = "* *"

        this.v[3] = "* *"

        this.v[4] = " * "



        this.w = new Array(height)

        this.w[0] = "* *"

        this.w[1] = "* *"

        this.w[2] = "***"

        this.w[3] = "***"

        this.w[4] = "***"



        this.x = new Array(height)

        this.x[0] = "* *"

        this.x[1] = "* *"

        this.x[2] = " * "

        this.x[3] = "* *"

        this.x[4] = "* *"



        this.y = new Array(height)

        this.y[0] = "* *"

        this.y[1] = "* *"

        this.y[2] = "***"

        this.y[3] = " * "

        this.y[4] = " * "



        this.z = new Array(height)

        this.z[0] = "***"

        this.z[1] = "  *"

        this.z[2] = " * "

        this.z[3] = "*  "

        this.z[4] = "***"



        this['!'] = new Array(height)

        this['!'][0] = " * "

        this['!'][1] = " * "

        this['!'][2] = " * "

        this['!'][3] = "   "

        this['!'][4] = " * "



        this[':'] = new Array(height)

        this[':'][0] = "   "

        this[':'][1] = " * "

        this[':'][2] = "   "

        this[':'][3] = " * "

        this[':'][4] = "   "



        this['.'] = new Array(height)

        this['.'][0] = "   "

        this['.'][1] = "   "

        this['.'][2] = "   "

        this['.'][3] = "   "

        this['.'][4] = " * "



        this['='] = new Array(height)

        this['='][0] = "   "

        this['='][1] = "***"

        this['='][2] = "   "

        this['='][3] = "***"

        this['='][4] = "   "



        this['='] = new Array(height)

        this['='][0] = "   "

        this['='][1] = "***"

        this['='][2] = "   "

        this['='][3] = "***"

        this['='][4] = "   "



        this['+'] = new Array(height)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -