Gest3r Posted November 18, 2008 Report Posted November 18, 2008 (edited) Tātad man ir skripts kura ir 2 mazi table un uzspiežot uz viena atveras viens teksts uzspiežot uz otra atveras cits teksts.. Bet problēma tāda ka viņi ir viens zem otra (tie abi table) Vai kāds var pateikt kā viņus rindā uzlikt? Mēģināju ņemt nost vajadzīgos <tr> </tr> , bet nekas nesanāca Rekur skripts kurā ietilpst java script , css , un html(php) <script type="text/javascript"> function change(id){ ID = document.getElementById(id); if(ID.style.display == "") ID.style.display = "none"; else ID.style.display = ""; } </script> <style type="text/css"> BODY { text-align: center} .tbl { FONT: NORMAL 11px/14px verdana, arial, sans-serif; border: 1px solid black; padding: 3px; Background: #F3F3F3; height: auto } A {COLOR: #333333; TEXT-DECORATION: none; FONT-SIZE: 11px; font-weight: bold } A:hover { COLOR: black; TEXT-DECORATION: none; FONT-SIZE: 11px; font-weight: bold} </style> [/color] <body> <table width="60"> <tr> <td title="Show/Hide" onclick="change(1)" style="cursor: hand" onMouseOver="style.backgroundColor='#cecece';" onMouseOut="style.backgroundColor='#F3F3F3'" class="tbl" width="170" height="25">» <a onclick="change(1)" href="#">Posti</a></td> </tr> <!-- Sub menu 1 --> <tr style="display: none" id="1"> <td class="tbl" width="170" height="25" style="background-color: #FFFFFF"> te teksts 1</td> </tr> <tr> <td title="Show/Hide" onclick="change(2)" style="cursor: hand" onMouseOver="style.backgroundColor='#cecece';" onMouseOut="style.backgroundColor='#F3F3F3'" class="tbl" width="170" height="25">» <a onclick="change(2)" href="#"> Faili</a></td> </tr> <!-- Sub menu 2 --> <tr style="display: none" id="2"> <td class="tbl" width="170" height="25" style="background-color: #FFFFFF"> te teksts 2</td> </tr> </table> </body> Edited November 18, 2008 by Gest3r
andrisp Posted November 18, 2008 Report Posted November 18, 2008 Lūdzu, novāc tās krāsiņas un saliec kodus CODE tagā vai arī paste.php.lv
Gest3r Posted November 18, 2008 Author Report Posted November 18, 2008 http://paste.php.lv/8467?lang=php
p4F Posted November 18, 2008 Report Posted November 18, 2008 man šķiet ka tu ne tur iepostoji vajadzētu laikam HTML un XHTML vai CSS
Recommended Posts