document Web-. , :
image1.outerHTML;
. , .
, , images, document. .
document.images.item(1);
document.images.item("iamge1");
, , item(), . .
document.images(1);
document.images("image1");
Web- HTML-. ID .
<img src="img1.gif" id="image1">
<script type="text/javascript">
var someImage = document.images("image1");
</script>
all Web-. HTML- .
document.all(8); document.all("iamge1")
ID , . . :
document.all("image1", 2)
document.all("image1") image1. length - . , .
document . .
all | , <html>, <head>, <title> <body>. |
anchors | "" |
embeds | , . |
forms | Web-. |
images | . |
layers | . |
links | . |
location | location . |
scripts | , . |
selection | selection, . |
styleSheets | . |
all tags, . .
document.all.tags("H1")
, . links. all, .
|
|
<!-- pr24: -->
<html> <head>
<title> </title>
<script type="text/javascript">
function findtags()
{var tag;
var tags=" ";
for(i=0;i<document.all.length;i++)
{tag=document.all(i).tagName;
tags=tags+" \r"+tag;}
alert(tags);
return tags;}
</script>
</head>
<body onload="findtags()">
<h2 >
</h2>
</body> </html>
HTML
HEAD
TITLE
SCRIPT
BODY
H2
getElementByName NAME, . NAME HTML . getElementByTagName , , . :
document.getElementByName("someimage")
document.getElementByTagName("H1")