Some webpages, such as changing themes, adjusting transparency, and adding modules. You do not need to refresh the page to see the effect in real time. How is this implemented? Ajax alone does not seem to work, right? Front-end tips. Please try to provide more details. Thank you! Some webpages, such as changing themes, adjusting transparency, and adding modules. You do not need to refresh the page to see the effect in real time.
How is this implemented? Ajax alone does not seem to work, right?
Front-end tips. Please try to provide more details. Thank you!
Reply content:
Some webpages, such as changing themes, adjusting transparency, and adding modules. You do not need to refresh the page to see the effect in real time.
How is this implemented? Ajax alone does not seem to work, right?
Front-end tips. Please try to provide more details. Thank you!
-
AJAX can dynamically obtain content.
-
DOM operations (adding and deleting nodes, adding and deleting content, modifying attributes, especially class attributes ). This allows you to add modules and modify visual effects.
-
JS can also dynamically modify the style by modifying element. style. In this way, the modification transparency and other effects can be achieved.
-
DOM also supports dynamically creating tags such as scripts and links. To dynamically introduce scripts and style files required by the topic.
I can't think of it.
Ajax is usually used. You can also nest a frame and refresh the frame to interact with the page.
But what you said, adjust transparency and add modules. In most cases, there is no need to interact with the background, and interaction is just to access and write data. Most operations are still JavaScript operations on dom.
In addition to the ajax and iframe methods mentioned above, you can understand the html5 history api.
All are implemented using plug-ins, such as angular mobilebone backbone.
What you are talking about is the blind view of css, using anchor, frame, etc.
During topic switching, the general implementation is to switch the reference to css.