Sie sind auf Seite 1von 2

9

1) <?xml version="1.0" encoding="UTF-8" ?> <actor> <name>Carrie Fisher</name>

<address> <number>123</number> <street>Mapple</street> <city>Hollywood</city> </address> <address> <number>5</number> <street>Locust Ln</street> <city>Malibu</city> </address> <movie><title>Star Wars</title> <year>1977</year></movie> <movie> <title>Empire Strikes Back</title> <year>1980</year></movie> </actor> <actor> <name>Mark Hamill</name> <address> <number>456</number> <street>Oak Rd</street> <city>Brentwood</city> </address> <movie> <title>Return of the Jedi</title> <year>1983</year> </movie> <movie><title>Empire Strikes Back</title> <year>1980</year> </movie> </actor>

2) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head> <title>Announcement</title> <script> function action(){

if (document.getElementById('hide').value == "0") { document.getElementById('content').style.display = "none"; document.getElementById('hide').value = "1"; } else if (document.getElementById('hide').value == "1") { document.getElementById('hide').value = "0"; document.getElementById('content').style.display = "block"; } } </script> <style> #content{ display:block; } </style></head>

<body> <p id="content" style="display: none;">This is an announcement</p> <input value="1" name="hide" id="hide" type="hidden"> <div> <button onclick="action()" type="button">Click here!</button> </div>

</body></html>

Das könnte Ihnen auch gefallen