Javascript import html is it possible?

前端 未结 6 747
栀梦
栀梦 2020-12-01 13:30

I have some html pages with the same footer. With javascript and only javascript could i import another html page inside it?

6条回答
  •  感动是毒
    2020-12-01 13:50

    You could do a server side include, depending on your webserver. but the quickest way would probably be to create a JavaScript file that uses document.write or similar to output the html syntax. and then just include the created JavaScipt file the normal way. more info at: http://webdesign.about.com/od/ssi/a/aa052002a.htm

提交回复
热议问题