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

sql - VB.NET Operand type clash: date is incompatible with int error -

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

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -