1. HTML
Sometimes an HTML fragment is saved in an HTML file, the HTML file is directly read on another main page, and then the HTML code fragment inside is parsed and integrated into the main page.
fragment.html file, its content:
Parse the code in the main page
Test.html
2. JSON
The JSON file is test.json, its content:
[code]
[{"name":"jim","age":"20 "},{"name":"lily","age":"18","hobby":["swim","movie"]}]
Parse the code in the main page
Test.html