Menu
Hi
I’m having trouble understanding why Firefox would say “links[i].indexOf is not a function on this:
[code=html]
<html>
<head>
<script>
function doStuff(){
var links = document.getElementsByTagName(‘a’);
for(var i=0; i<links.length; i++) {
alert(links[i].indexOf(‘w=0’));
}
}
</script>
</head>
<body>
<a href=”http://blupp”>test</a>
<a href=”http://blupp”>test 2</a>
<a href=”http://blupp&w=0″>test 3</a>
<input type=”button” onclick=”doStuff()” value=”clickme”>
</body>
</html>
links[i] is a string, right? I’m trying to see which links contain the w=0 in them you see…
Thanks for your time
Lubox