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
Post a Comment