-1

i am failing to make the import function work, i am trying to import latestfeatures.html to Untitled Document.html here is my sample code can anyone check it and tell me what is wrong.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<link rel="import" href="/template/html/latestfeatures.html">

<script>
var link = document.querySelector('link[rel="import"]');
var content = link.import;

// Grab DOM from latestfeatures.html's document.
var el = content.querySelector('.latestfeatures');

document.body.appendChild(el.cloneNode(true));
</script>

</head>

<body>
<div id="includedContent"></div>
</body>
</html>

1 Answers1

0

you can use html iframe as iframe. Here you can get details of iframe.

http://www.w3schools.com/html/html_iframe.asp

Ahmad Sharif
  • 4,141
  • 5
  • 37
  • 49