


html framework-multiple dialog boxes (same id) processing_html/css_WEB-ITnose
Most of the data on a website is refreshed asynchronously, which is nothing to say. Now there are many front-end and back-end frameworks. Everyone knows that frameworks are easy to use. You don’t need to write styles yourself, just use the syntax on the framework. It can produce beautiful dynamic effects, and when using a framework, most dynamic effects are generated dynamically. For example, take a dialog box. For example, if the homepage is a datagrid table display, then double-click to edit and enter Edit dialog box, and the data in this dialog box is dynamically generated, this is easy to handle, because there is only one layer of dependencies, so there will be no duplicate ID bugs in the code specification point, but if you In this editing dialog box, there is a function to select icons. The click event generates an icon selection dialog box. Sometimes the generated code will be very illogical, because you are obviously editing a dialog box. There is a dialog box loaded under the elements inside, but the html you see with the browser has gone under the body. Isn't this very depressing? Now your dynamic loading will click the edit dialog box without refreshing next time. It's okay. When you click the icon selection in the dialog box, it turns out that only the HTML under the parent element of the table was processed, but the elements under the body were not processed. However, the elements under the body cannot be processed entirely, otherwise the homepage will be gone, so After processing the elements in the table, you must also process the elements in the second dialog box, so that overlapping elements can be removed each time. As for how to deal with it, there are several methods, and direct removal is faster.
When I encountered this kind of problem before, I didn’t solve it in depth. Maybe some people would say to directly add a class to pop up, so that the ID will not be repeated. In this case, N dialog boxes will pop up at once. It didn't work. Then the solution I thought of was not to pop up repeatedly, but to refresh it directly after it is displayed. Don't pop it up again. This will not cause multiple ones to be generated, just like the table editing dialog box, because there is only one , it will not be closed after it is displayed. After it is closed, it will be processed again when it is opened, so this is no problem. But when the above problem comes, it will not be displayed forever and will not be closed, so this This method solved it for a while, but it didn't solve the problem fundamentally. I was in a good mood today, so I wrote a diary.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.
