JavaScript DHTML/Document/all
Версия от 12:59, 26 мая 2010; (обсуждение)
Check if a tag exists
<source lang="html4strict">
<html> <head> <title>A Simple Page</title> <script language="JavaScript"> function findhead1() {
var detectElement = document.all("head1"); if (detectElement == head1) { alert("Element \"head1\" exists"); }
} </script> </head> <body onload="findhead1()">
Heading One
</body> </html>
</source>