About html component reuse

problem description


the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

Jul.06,2021

you can write a separate header, and package it into pages using gulp.


1. You just iframe go in
2. Let the backend cover the template for you
3. Generate vue project


with vue-cli
  1. html can be imported through < link rel= "import" href= "myfile.html" >, but browsers may not intend to support it all;
  2. you can use template engines such as Pug, ejs to support import, but you need to convert templates to standard html,. It's easy to do this through gulp.
  3. of course, you can also load code snippets through ajax, and insert them back into the corresponding position after loading.

recommend the way you use the template engine

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e541e2-4529f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e541e2-4529f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?