<script type="text/javascript">
var all_a = document.getElementsByTagName("a");
var this_link = window.location.toString();
this_link = this_link.substr(7,parseInt(this_link.indexOf("/",7)-7));
var external_links_count = 0;
for(var i=0; i<all_a.length; i++){
if(all_a[i].href.indexOf(this_link)==-1){
external_links_count++;
}
}
alert("External links count is: "+external_links_count);
</script>
No comments:
Post a Comment