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

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -