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

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -