ערכתי לאחרונה בתאריך 06.04.04 בשעה 19:13 בברכה, הררי פוטר
זה הסקריפט עצמו-
<script language="JavaScript"> function toggle(e) { if (document.all.HideShow.style.display == "none" ) { document.all.HideShow.style.display = ""; } else { document.all.HideShow.style.display = "none"; } } </script>
|
ואם אתה רוצה שזה יהיה כמו שאני עשיתי שהטבלה ממשיכה אז בתגית <tr> אתה צריך לשים את הדבר הבא ואז זה מסתיר בעיקרון את א-<td>שבתוכו-
<tr id="HideShow" style="display: none">
|
ואז איפה שאתה רוצה תשים כפתור, קישור מה שבא לך ותשים את זה-
אתה רואה שכתוב שם 0 יופי אז זה אומר על איזה טבלה זה ישפיע בעצם אם יש לך כמה כמו בדף שבאתר וזה הולך לפי הסדר - ה-<tr> שהכי למעלה הוא 0, אחריו הוא יהיה אחד אחרי זה יהיה 2 וכל מה שאתה צריך לשנות שם זה את ה-0
קבל דוגמא קטנה שעשיתי עכשיו משהו פשוט בשבילך שתבין-
<html dir="rtl"> <head> <script language="JavaScript"> function toggle(e) { if (document.all.HideShow.style.display == "none" ) { document.all.HideShow.style.display = ""; } else { document.all.HideShow.style.display = "none"; } } </script> </head> <body> <p align="center"> <a onclick="toggle(0);" style="cursor: hand"><font size="2" color="black" face="arial">הראה את הראשון (0)</font></a><br> <a onclick="toggle(1);" style="cursor: hand"><font size="2" color="black" face="arial">הראה את השני (1)</font></a><br> <a onclick="toggle(2);" style="cursor: hand"><font size="2" color="black" face="arial">הראה את השלישי (2)</font></a><br> <table width="50%" align="center" dir="rtl" border="1"> <tr id="HideShow" style="display: none"> <td width="100%" align="center" dir="rtl"> עכשיו רואים אותי (אני 0) </td> </tr> </table> <br> <table width="50%" align="center" dir="rtl" border="1"> <tr id="HideShow" style="display: none"> <td width="100%" align="center" dir="rtl"> עכשיו רואים אותי (אני 1) </td> </tr> </table> <br> <table width="50%" align="center" dir="rtl" border="1"> <tr id="HideShow" style="display: none"> <td width="100%" align="center" dir="rtl"> עכשיו רואים אותי (אני 2) </td> </tr> </table> </body> </html>
|
מקווה שהבנת ואם יש שאלות אז שאל...