<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript"> function togglediv(id){ var divstatus = document.getElementById(id); if(divstatus.style.display == 'block') divstatus.style.display = 'none'; else divstatus.style.display = 'block'; } </script> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="pl" /> <meta name="Robots" content="ALL" /> <meta name="keywords" content=""> <meta name="description" content="" /> </head> <body> </body> </html>
I teraz potrzebuje zrobic tak, aby przy otworzeniu naglowka 2 automatycznie zamykal sie naglowek 1, jak to zrobic?