What would be the native javascript equivalent to the jquery below?
$('#anyDiv').load("anyPage.htm");
Yes, there is:
function load(target, url) {
var r = new XMLHttpRequest();
r.open("GET", url, true);
r.onreadystatechange = function () {
if (r.readyState != 4 || r.status != 200) return;
target.innerHTML = r.responseText;
};
r.send();
}
load(document.getElementById('anyDiv'), 'anyPage.htm');
You can try like this.
document.getElementById("anyDiv").innerHTML='<object type="text/html" data="anyPage.html" ></object>';
<object> tag needs CSS. Try something like this cssfile=http://www.yoursite.com/site1.css" inside your <object> tag. For more information refer this link htmlforums.com/html-xhtml/…