Hi,
On both Opera and Firefox, getElementsByTa gName doesn't find anything
apart from <optionelemen ts inside a select element. Why is this?
Here's a page that demonstrates this behaviour. I'd have thought the
correct behaviour would be to show "count: 1" but instead, you get
"count: 2".
Is this because only <option>s <select>s?
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
</title>
<script type='text/javascript'>
window.onload = function() {
var elems = document.getEle mentsByTagName( "xref");
alert("count: " + elems.length);
};
</script>
<style type='text/css'></style>
</head>
<body>
<div id='banner'>
<h1>
</h1>
</div>
<div id='content'>
<select>
<xref ref="1"/>
</select>
</div>
</body>
</html>
Cheers,
Andy
On both Opera and Firefox, getElementsByTa gName doesn't find anything
apart from <optionelemen ts inside a select element. Why is this?
Here's a page that demonstrates this behaviour. I'd have thought the
correct behaviour would be to show "count: 1" but instead, you get
"count: 2".
Is this because only <option>s <select>s?
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
</title>
<script type='text/javascript'>
window.onload = function() {
var elems = document.getEle mentsByTagName( "xref");
alert("count: " + elems.length);
};
</script>
<style type='text/css'></style>
</head>
<body>
<div id='banner'>
<h1>
</h1>
</div>
<div id='content'>
<select>
<xref ref="1"/>
</select>
</div>
</body>
</html>
Cheers,
Andy
Comment