// 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>
// 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
Code Example |
---|
Html :: game code in html |
Html :: same form two submits |
Html :: picture element html |
Html :: bootstrap box |
Html :: link in html |
Html :: html contenteditable attribute |
Html :: simple program of html |
Html :: html button |
Html :: collapse bootstrap |
Html :: large text class |
Html :: radio buttons in bootstrap |
Html :: can se have same id for radio button in html |
Html :: ionic disable input field |
Html :: how to run html file in xampp server |
Html :: html elements list explained |
Html :: razor view partial view |
Html :: offline p5.js html |
Html :: html ecrire en gras |
Html :: negrita htm |
Html :: html make card |
Html :: contact us form html send email |
Html :: is it illegal to hunt polar bears |
Html :: html render div |
Html :: linux list files onlr |
Html :: How to play a s3 video url in html video tag? |
Html :: asp.net mvc go to page |
Html :: iframe messaging |
Html :: jspdf html to pdf angular 8 |
Html :: col tag in html |
Html :: jquery html button |