I want to get the html content of another page, so i use the following jquery .get() function
$.get("chk_vga.aspx", function(data) {
alert($('#vga').html());
});
in the "chk_vga.aspx" page, it only have one value
<html>
<body>
<div id="vga">F</div>
</body>
</html>
how can my jquery function get the "F" value?
.load('chk_vga.aspx #vga', function(data) {
alert(data);
});
To access the content you need to add it to an element.
$.get("chk_vga.aspx", function(data) {
var foo = jQuery("<div></div>").html(data).find("#vga").html();
alert(foo);
});
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