简体   繁体   中英

JavaScript Hide Dom Modal Window

On the page linkvertise(dot) com I noticed that if you click on the Premium button in the upper right corner, completely new HTML markup appears in the source code. And if you click again, the new markup disappears.

My question is, what is the most up-to-date way to make a modal window appear? An already created window with display none or a window that is being created on button click?

I don't think that beetween the two options there is one more up-to-date. But I would say that using an already ceated window is more efficient:

  • Using an already created window is simpler while coding
  • It uses less CPU
  • It uses les files, so less memory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM