
27-09-2007, 00:48
|
|
|
|
חבר מתאריך: 30.07.05
הודעות: 949
|
|
המ..
זה צריך לעשות את העבודה, תשאל אם משהו לא ברור:
קוד PHP:
<script> function alter(check, id) { var cbox = document.getElementById(check); //get the checkbox var elem = document.getElementById(id); //get the div id if (cbox.checked) elem.style.display = 'block'; //if checked, show else elem.style.display = 'none'; //if unchecked - hide } </script> <input type="checkbox" id="showhide" onClick="return alter(this.id, 'mytest');" CHECKED> Show Div <div id="mytest"> text text text text text text <br> text text text <br> text text text text text text text <br> text text <br> text text text text t </div> <script> // Initilization: (important!!) // Comes at the end! alter('showhide', 'mytest'); // run when page loads! </script>
_____________________________________
חתימתכם הוסרה כיוון שלא עמדה בחוקי האתר. לפרטים נוספים לחצו כאן. תוכלו לקבל עזרה להתאמת החתימה לחוקים בפורום חתימות וצלמיות.
|