


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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

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











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.

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

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.

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.
