My Body looks like this:
Code:
<body>
<div class="postprofile" id="profile1">
<span style="white-space:nowrap;">
<span style="color:#536482;">Posts</span>: </span> 5
<br />
</div>
</body>
I want to get the number
5 so I use this javascript
:
Code:
x = document.getElementsByTagName('div')
For(y=0;y<x.length;y++)
{
If(x[y].className == "postprofile"){
A= x[y].innerHTML;
B=parseInt(x[y].innerHTML.split("Posts</span>: </span> ")[1]);
Document.write(B);
}
}
And it worked fine in Firefox, but not in IE. Can anybody help me with this??