javascript - where to store html strings on client for later DOM insertion? -
In a single-page-application, there are some views (i.e. the section of HTML code) that are not initially shown, But can be shown later. I can add these views to the dome when necessary, but I do not have to load them dynamically from the server. Instead, I want to load them from the server when the rest of the page loads. Where is the best place to keep such multi-line HTML segments, so that they can be easily accessed from Javascript and can be added to the DOM? Are there special HTML tags for this type of thing?
you << Code> width
display: any ( A
div html part), when needed, to show where necessary (by adding the DOM structure).
Comments
Post a Comment