The original: jquery implements the function of the alternative IFRAME
The use of IFRAME can be well embedded in other Web pages or Web sites, but the IFRAME every time the load will be wasted a lot of time, and will prevent the loading of other elements, the search engine does not recognize the page Ifram frame called links, text, pictures and so on.
HTML code
<ul class= "List-side" > <li><a target= "a.html" >about</a></li> <li><a target= " B.html ">news</a></li> <li><a target=" c.html ">product</a></li> <li> <a href= "http://ucmic.blogspot.com/" target= "_blank" >contact</a></li></ul><div id= " iframe > <!--jquery Insert HTML address--></div>
JavaScript code to implement functionality
$ (document). Ready (function () {$.get ("a.html", function (data) {///initial a.html include Div#iframe $ ("#iframe"). HTML (data) ; }); $ (function () {$ ('. List-side li '). Click (function () { //) find the hyperlink in the Li href (#id) var $this = $ (this), _clicktab = $this. Find (' a '). attr (' target '); Locate the value of Targer in Link a $.get (_clicktab,function (data) {$ ("#iframe"). HTML (data); }); });});