<html>
<head>
<script src="http://code.jquery.com/jquery-3.3.1.min.js"></script>
</head>
<body>
<div id="target-div"></div>
<div id="error"></div>
<div id="success"></div>
<script>
//$('#target-div').load('https://example.com.au');
$( "#success" ).load( "https://example.com.au #divId", function( response, status, xhr ) {
$( "#success" ).html( response );
if ( status == "error" ) {
var msg = "Sorry but there was an error: ";
$( "#error" ).html( msg + xhr.status + " " + xhr.statusText );
}
});
</script>
</body>
</html>
I get this response
Sorry but there was an error: 0 error
I tried <iframe>
but whole website get load with <iframe>
while I just need to load particular section , I tried "<iframe>
with div id but no luck.