It is necessary that the contents of the html list element be displayed in the alert js window. But, the code below does not work. Tell me, pliz, errors:
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript"> function Click(evt) { alert(evt.target.ownerDocument.getElementByTagName('li').innerHTML); { </script> </head> <body> <ul> <li onclick = "Click(evt);">Первый</li> <li onclick = "Click(evt);">Второй</li> </ul> </body> </html>