I'm trying to get innerHTML of a DIV that is located on external page. It is possible to do this using this kind javascript code?
<script type="text/javascript">
$(document).ready(function(){
var html = document.getElementById("glr1").src='/my_page.html'.innerHTML ;
alert(html);
});
</script>
the jquery load function allows you to specify an element id to load
$('#result').load('ajax/test.html #container');
http://api.jquery.com/load/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With