javascript - How to extract text from an script result -


i using script visitor's country name:

<script src="http://www.seocentro.com/cgi-bin/promotion/geo/geocn.pl" type="text/javascript"></script> 

this geocn.pl url returns:

document.write('<a href="http://www.seocentro.com/tools/online/ip-country.html" style="text-decoration: none;">somecountryname</a>'); 

what should use next obtain window.alert name of country?

window.alert(country); 

use below code:

<script>     $(document).ready(function(){     alert($("a:first").text()); }); </script> 

Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -