In diesem Artikel wird die Methode von JS beschrieben, um die Webtabellen automatisch zu erhöhen und zu reduzieren. Teilen Sie es für Ihre Referenz. Die spezifische Analyse ist wie folgt:
Dies ist ein personalisierter dynamischer Tabelleneffektcode. Die Tabellen auf der Webseite werden automatisch vergrößert oder reduziert und ständig geändert
Es betont hauptsächlich die Rolle der Anzeige
Kopieren Sie den Code wie folgt: <html>
<kopf>
<title> JS Moving Table </title>
<Meta content = "text/html; charSet = hz-gb-2312" http-äquiv = content-type>
<Styles> .cellstyle {
Farbe: #ffffff; Schriftfamilie: Zeiten; Schriftgröße: 11pt; Schriftgewicht: fett
}
A {
Farbe: #ff0000; Textdekoration: Keine
}
A: Hover {
Farbe: Textablagerung: Unterstreich
}
</Style>
<Script Language = JavaScript>
var i_borderColor = 0
var i_borderColorlight = 10
var i_borderColordark = 20
var v_borderColor = 1
var v_borderColorlight = 1
var v_borderColordark = 1
var textColor = new Array ()
textColor [0] = "fffff"
textColor [1] = "fff8f8"
textColor [2] = "fff0f0"
textColor [3] = "ffd8d8"
textColor [4] = "ffd0d0"
textColor [5] = "ffc8c8"
textColor [6] = "ffc0c0"
textColor [7] = "ffb8b8"
textColor [8] = "ffb0b0"
textColor [9] = "ffa8a8"
textColor [10] = "ffa0a0"
textColor [11] = "ff9898"
textColor [12] = "ff9090"
textColor [13] = "ff8888"
textColor [14] = "ff8080"
textColor [15] = "ff7878"
textColor [16] = "ff7070"
textColor [17] = "ff6868"
textColor [18] = "ff6060"
textColor [19] = "ff5858"
textColor [20] = "FF5050"
textColor [21] = "FF4848"
textColor [22] = "FF4040"
textColor [23] = "ff3838"
textColor [24] = "ff3030"
textColor [25] = "FF2828"
textColor [26] = "ff2020"
textColor [27] = "ff1818"
textColor [28] = "ff1010"
textColor [29] = "ff0808"
textColor [30] = "ff0000"
Funktion checkbrowser () {
if (document.layers) {
Alert ("Dieses Skript erfordert Internet Explorer 4 oder höher. Entschuldigung Leute!")
}
if (document.all) {
BorderColor ()
}
}
Funktion borderColor () {
if (i_borderColor> = textColor.length-1) {v_borderColor*=-1}
if (i_borderColor <= 0) {v_borderColor*=-1}
if (i_borderColordark> = textColor.length-1) {v_borderColordark*=-1}
if (i_borderColordark <= 0) {v_borderColordark*=-1}
if (i_borderColorlight> = textColor.length-1) {v_borderColorlight*=-1}
if (i_borderColorlight <= 0) {v_borderColorlight*=-1}
document.all.cellone.borderColor = textColor [i_borderColor]
document.all.cellone.borderColordark = textColor [i_borderColordark]
document.all.cellone.borderColorlight = textColor [i_borderColorlight]
document.all.cellone.border = i_borderColorlight*2
i_borderColor+= v_borderColor
i_borderColordark+= v_borderColordark
i_borderColorlight+= v_borderColorlight
var timer = setTimeout ("borderColor ()", 100)
}
</Script>
<Meta content = "Microsoft FrontPage 4.0" Name = Generator> </head>
<Body Hintergrund = "" bgcolor =#ffffff onload = pokbrowser ()>
<P Align = Center>
<Table Border = 0 CellPadding = 6 ID = Cellon -Breite = 540>
<tbody>
<tr>
<Td Align = Middle Class = CellStyle>
<font color = "#800000"> // www.vevb.com </font>
</Tr> </tbody>
</Table>
</Body>
</Html>
Ich hoffe, dieser Artikel wird für JavaScript -Programme aller hilfreich sein.