The method of realizing the auto-scaling and shrinking of the Web table by JS _javascript skill

Source: Internet
Author: User
Tags microsoft frontpage

The example of this article is about how to reduce the form of Web page automatically by JS. Share to everyone for your reference. The specific analysis is as follows:

This is a personalized dynamic table effect code, the table in the Web page automatically zoom in or zoom out, constantly changing
is mainly a function of emphasizing the display

Copy Code code as follows:
<HTML>
<HEAD>
<title>js will move the form </TITLE>
<meta content= "text/html; charset=hz-gb-2312 "http-equiv=content-type>
<style>.cellstyle {
COLOR: #ffffff; Font-family:times; font-size:11pt; Font-weight:bold
}
A
COLOR: #ff0000; Text-decoration:none
}
a:hover {
COLOR: #ff8888; Text-decoration:underline
}
</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] = "FFFFFF"
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"
function Checkbrowser () {
if (document.layers) {
Alert ("This script requires Internet Explorer 4 or higher.") Sorry folks! ")
}
if (document.all) {
BorderColor ()
}
}
function 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><body background= "" Bgcolor= #ffffff Onload=checkbrowser () >
<p align=center>
<table border=0 cellpadding=6 id=cellone width=540 height= ">"
<TBODY>
<TR>
&LT;TD align=middle class=cellstyle height= ">"
<font color= "#800000" >http://www.jb51.net</font>
</TR></TBODY>
</TABLE>
</BODY>
</HTML>

I hope this article will help you with your JavaScript programming.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.