Icontem

File: index.html

Recommend this page to a friend!
  Classes of Pravin Sonawane  >  Simple JavaScript Tabs  >  index.html  >  Download  
File: index.html
Role: Example script
Content type: text/plain
Description: Index File
Class: Simple JavaScript Tabs
Switch the content displayed for different tabs
Author: By
Last change:
Date: 4 years ago
Size: 1,339 bytes
 

Contents

Class file image Download
<html>
<head>
<title>Simple JavaScript Tabs</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="60%" cellspacing="0" cellpadding="0" border="0">
    <tr>
        <td width="5%" align="center"></td>
        <td width="7%" align="center" data="1" name="tabs[]" onclick="javascript: myObject.seltab('Tab1 Content',1);" class="tab_sel">Tab1</td>
        <td width="1px"></td>
        <td width="7%" align="center" data="2" name="tabs[]" onclick="javascript: myObject.seltab('Tab2 Content',2);" class="tab">Tab2</td>
        <td width="1px"></td>
        <td width="7%" align="center" data="3" name="tabs[]" onclick="javascript: myObject.seltab('Tab3 Content',3);" class="tab">Tab3</td>
        <td width="1px"></td>
        <td width="7%" align="center" data="4" name="tabs[]" onclick="javascript: myObject.seltab('Tab4 Content',4);" class="tab">Tab4</td>
        <td align="left">&nbsp;</td>
    </tr>
    <tr>
        <td valign="top" align="left"  colspan="11">
            <div id="tabs_data" class="content_box"></div>
        </td>
    </tr>
</table>
<script language="javascript" src="mytabs.js"></script> 
<script language="javascript" type="text/javascript">
	myObject = new mytab();
	myObject.seltab('Tab1 Content',1); // default tab
</script>
</body>
</html>