Tabstrip application example

Source: Internet
Author: User

<HTML>
<Head>
<Title> insert table </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Body bgcolor = buttonface scroll = No topmargin = 5>

<Style type = "text/CSS">
Div, TD {cursor: default; font-family:; font-size: 9pt ;}
</Style>
<Script language = JavaScript>
Function tableok (){
VaR dotable, tmpcol, tmprow, docol, dorow
If (b7-[ 0]. Checked) {algn = "Left ";}
If (b7-[ 1]. Checked) {algn = "center ";}
If (b7-[ 2]. Checked) {algn = "right ";}
Tmpcol = "<TD align =" + algn + "> </TD> ";
Docol = ""
Dorow = ""
For (VAR I = 0; I <TBC. value; I ++ ){
Docol = docol + tmpcol;
}
Docol = "<tr>" + docol + "</tr>"
For (var j = 0; j <TBR. value; j ++ ){
Dorow = dorow + docol;
}
Dotable = "<Table border =" + TBB. value + "cellspacing =" + TBS. value + "cellpadding =" + TBP. value + ">" + dorow + "</table>"
Alert (dotable );
}
</SCRIPT>
<Script language = VBScript>
Sub tabstrip_change ()
If (tabstrip. value = 0) then
Page1.style. Visibility = "hidden"
Page0.style. Visibility = "visible"
End if
If (tabstrip. value = 1) then
Page0.style. Visibility = "hidden"
Page1.style. Visibility = "visible"
End if
End sub
</SCRIPT>

<Center>
<Object ID = "tabstrip" classid = "CLSID: eae50eb0-4a62-11ce-bed6-00aa00611080" style = "width: 285px; Height: 150px">
<Param name = "listindex" value = "0">
<Param name = "newversion" value = "-1">
<Param name = "accelerator" value = "& A; B;">
<Param name = "tipstrings" value = "this is a general setting; this is an advanced setting;">
<Param name = "fontname" value = "">
<Param name = "items" value = "general settings; advanced settings;">
</Object>
<Div id = "page0" style = "visibility: visible; position: absolute; left: expression (tabstrip. offsetleft + 6) + 'px '); top: expression (tabstrip. offsettop + 30) + 'px '); width: 280px; Height: 200px; text-align: Left; ">
<Table border = 0 cellpadding = 0 cellspacing = 2>
<Tr> <TD> Border width: </TD> <input type = text name = TBB size = 20 value = "1" maxlength = 2 onkeypress = "If (event. keycode <45 | event. keycode> 57) event. returnvalue = false; "class = hole> </TD> <TD> PX </TD> </tr>
<Tr> <TD> Number of table rows: </TD> <input type = text name = TBC size = 20 value = "2" maxlength = 2 onkeypress = "If (event. keycode <45 | event. keycode> 57) event. returnvalue = false; "class = hole> </TD> <TD> row </TD> </tr>
<Tr> <TD> Number of table columns: </TD> <input type = text name = TBR size = 20 value = "2" maxlength = 2 onkeypress = "If (event. keycode <45 | event. keycode> 57) event. returnvalue = false; "class = hole> </TD> <TD> column </TD> </tr>
</Table>
</Div>
<Div id = "page1" style = "visibility: hidden; position: absolute; left: expression (tabstrip. offsetleft + 6) + 'px '); top: expression (tabstrip. offsettop + 30) + 'px '); width: 280px; Height: 200px; text-align: Left; ">
<Table border = 0 cellpadding = 0 cellspacing = 2>
<Tr> <TD> border Spacing: </TD> <input type = text name = TBS size = 16 maxlength = 2 value = "2" onkeypress = "If (event. keycode <45 | event. keycode> 57) event. returnvalue = false; "class = hole> </TD> <TD width = 85> PX </TD> </tr>
<Tr> <TD> Margin Size: </TD> <input type = text name = TBP size = 16 maxlength = 2 value = "2" onkeypress = "If (event. keycode <45 | event. keycode> 57) event. returnvalue = false; "class = hole> </TD> <TD> PX </TD> </tr>
<Tr> <TD> alignment: </TD> <TD colspan = 2> <input type = radio name = guid checked> <input type = radio name = IBS> right </TD> </tr>
</Table>
</Div>
<Div align = "center" style = "position: absolute; left: expression (tabstrip. offsetleft + 6) + 'px '); top: expression (tabstrip. offsettop + tabstrip. style. posheight-30) + 'px '); width: 280px; Height: 80px; "align =" center ">
<Table border = 0 cellpadding = 0 cellspacing = 0>
<Tr>
<TD width = 50 align = center> <input type = button onclick = "window. Close ();" value = "cancel" class = cmdbtn> </TD>
<TD width = 50 align = center> <input type = button onclick = "tableok ();" value = "complete" class = cmdbtn> </TD>
</Tr> </table>
</Div>
</Center>
<SCRIPT>
Window. setTimeout ('tabstrip. Blur () ', 100 );
</SCRIPT>
<Div style = "width: 100%; padding: 10px" align = "center">
<Object ID = "menutabs" name = "menutabs" classid = "CLSID: EAE50EB0-4A62-11CE-BED6-00AA00611080" align = "baseline" border = "0"
Width = "533"
Height = "313">
<Param name = "listindex" value = "0">
<Param name = "forecolor" value = "4210816">
<Param name = "size" value = "14111; 8290">
<Param name = "items" value = "Main; links; topics; help;">
<Param name = "taborientation" value = "2">
<Param name = "multirow" value = "-1">
<Param name = "tipstrings" value = "8888;">
<Param name = "names" value = "Main; links; topics; help;">
<Param name = "newversion" value = "-1">
<Param name = "tabsallocated" value = "4">
<Param name = "tags" value = ";">
<Param name = "tabdata" value = "4">
<Param name = "accelerator" value = ";">
<Param name = "fontname" value = "Arial">
<Param name = "fonteffects" value = "1073741825">
<Param name = "fontcharset" value = "0">
<Param name = "fontpitchandfamily" value = "2">
<Param name = "fontweight" value = "700">
<Param name = "tabstate" value = "3; 3; 3; 3">
</Object>
</Div>
</Body>
</Html>


Border Width: PX
Number of table rows: row
Number of table columns: column
Border Spacing: Px
Margin Size: Px
Alignment: LeftMediumRight

Author's blog:Http://blog.csdn.net/net_lover/

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.