Team:Grenoble/script
From 2012.igem.org
(Difference between revisions)
m |
m |
||
Line 80: | Line 80: | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | + | function swap_div(my_div, my_object){ | |
- | function swap_div(my_div, my_object) | + | if (document.getElementById(my_div).style.visibility == "hidden") |
- | { | + | { |
- | if (document.getElementById(my_div).style.visibility == "hidden") | + | document.getElementById(my_div).style.visibility = "visible"; |
- | { | + | my_object.value = "Cacher"; |
- | document.getElementById(my_div).style.visibility = "visible"; | + | } else { |
- | my_object.value = "Cacher"; | + | document.getElementById(my_div).style.visibility = "hidden"; |
- | } | + | my_object.value = "Afficher"; |
- | else | + | } |
- | { | + | |
- | document.getElementById(my_div).style.visibility = "hidden"; | + | |
- | my_object.value = "Afficher"; | + | |
- | } | + | |
} | } | ||
</script> | </script> |
Revision as of 13:11, 5 September 2012