“Inclua arquivo html no arquivo html” Respostas de código

Inclua arquivo html no arquivo html

// 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>
Faith Dev

html inclua página html

// 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
ammer

Respostas semelhantes a “Inclua arquivo html no arquivo html”

Perguntas semelhantes a “Inclua arquivo html no arquivo html”

Mais respostas relacionadas para “Inclua arquivo html no arquivo html” em HTML

Procure respostas de código populares por idioma

Procurar outros idiomas de código