Answers for "html include html page"

0

include html file in html file

// js
<script>
$(function () {
  var includes = $('[data-include]')
  $.each(includes, function () {
    var file = $(this).data('include')
    $(this).load(file)
  })
})
</script>
// html
<div data-include="header.html"></div>
<div data-include="footer.html"></div>
Posted by: Guest on December-27-2021
0

html include html page

// js
<script>
$(function () {
  var includes = $('[data-include]')
  $.each(includes, function () {
    var file = $(this).data('include')
    $(this).load(file)
  })
})
</script>
// html
<div data-include="header.html"></div>
<div data-include="footer.html"></div>

https://www.w3schools.com/howto/howto_html_include.asp
Posted by: Guest on January-19-2022

Code answers related to "html include html page"

Browse Popular Code Answers by Language