search
HomeWeb Front-endHTML TutorialExamples of inserting pictures in html and adding pictures in html

Insert pictures in html. To display pictures, you need HTML tags. You can use the img tag.

1. HTML image tag syntax

The code is as follows:

<img  src="/static/imghwm/default1.png"  data-src="pcss5-logo-201305.gif"  class="lazy"      style="max-width:90%"  style="max-width:90%" / alt="Examples of inserting pictures in html and adding pictures in html" >

img introduction:

src is followed by the image path address

width Set the image width

height Set the image height

2. Specific html image display example - TOP

We are in the html source code Insert three pictures respectively, one with the original size, one with the width and height changed to small, and one with the width and height changed to large.

1. The complete html code of the example:

The code is as follows:

 
 
 
 
图片插入html 在线演示 <a href="http://www.vcss.com</title">www.vcss.com</title</a>> 
</head> 

<body> 
<p>原始大图片</p> 
<p> 
<img  src="/static/imghwm/default1.png"  data-src="pcss5-logo-201305.gif"  class="lazy"      style="max-width:90%"  style="max-width:90%" / alt="Examples of inserting pictures in html and adding pictures in html" > 
</p> 
<p>改小图片</p> 
<p> 
<img  src="/static/imghwm/default1.png"  data-src="pcss5-logo-201305.gif"  class="lazy"      style="max-width:90%"  style="max-width:90%" / alt="Examples of inserting pictures in html and adding pictures in html" > 
</p> 
<p>改大图片</p> 
<p> 
<img  src="/static/imghwm/default1.png"  data-src="pcss5-logo-201305.gif"  class="lazy"      style="max-width:90%"  style="max-width:90%" / alt="Examples of inserting pictures in html and adding pictures in html" > 
</p> 
</body> 
</html></pre><p>2. Screenshot of the example of inserting the picture into the html</p>
<p><img src="/static/imghwm/default1.png" data-src="https://img.php.cn/upload/article/000/000/013/01a9772901e3e927a85b643220ded383-0.png?x-oss-process=image/resize,p_40" class="lazy" alt="Examples of inserting pictures in html and adding pictures in html"    style="max-width:90%"  style="max-width:90%" title="Examples of inserting pictures in html and adding pictures in html"></p>
<p>html image insertion display example screenshot</p>
<p>For more examples of html inserting images and html adding images, please pay attention to the PHP Chinese website! </p></div><div class="wzconShengming_sp"><div class="bzsmdiv_sp">Statement</div><div>The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn</div></div></div><div class="phpgenera_Details_mainL4"><div class="phpmain1_2_top"><a href="javascript:void(0);" class="phpmain1_2_top_title">Related Article<img class="lazy"
                            data-src="/static/imghwm/index2_title2.png" src="/static/imghw/default1.png" alt="" /></a></div><div class="phpgenera_Details_mainL4_info"><div class="phphistorical_Version2_mids"><a href="https://m.php.cn/faq/1796795191.html" title="From Text to Websites: The Power of HTML" class="phphistorical_Version2_mids_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                            data-src="https://img.php.cn/upload/article/001/253/068/174447404295304.jpg?x-oss-process=image/resize,p_40" alt="From Text to Websites: The Power of HTML" src="/static/imghw/default1.png"  /></a><a href="https://m.php.cn/faq/1796795191.html" title="From Text to Websites: The Power of HTML" class="phphistorical_Version2_mids_title">From Text to Websites: The Power of HTML</a><span class="Articlelist_txts_time">Apr 13, 2025 am	 12:07 AM</span><p class="Articlelist_txts_p">HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.</p></div><div class="phphistorical_Version2_mids"><a href="https://m.php.cn/faq/1796794693.html" title="Understanding HTML, CSS, and JavaScript: A Beginner's Guide" class="phphistorical_Version2_mids_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                            data-src="https://img.php.cn/upload/article/001/253/068/174438733162787.jpg?x-oss-process=image/resize,p_40" alt="Understanding HTML, CSS, and JavaScript: A Beginner's Guide" src="/static/imghw/default1.png"  /></a><a href="https://m.php.cn/faq/1796794693.html" title="Understanding HTML, CSS, and JavaScript: A Beginner's Guide" class="phphistorical_Version2_mids_title">Understanding HTML, CSS, and JavaScript: A Beginner's Guide</a><span class="Articlelist_txts_time">Apr 12, 2025 am	 12:02 AM</span><p class="Articlelist_txts_p">WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.</p></div><div class="phphistorical_Version2_mids"><a href="https://m.php.cn/faq/1796794180.html" title="The Role of HTML: Structuring Web Content" class="phphistorical_Version2_mids_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                            data-src="https://img.php.cn/upload/article/001/253/068/174430155217186.jpg?x-oss-process=image/resize,p_40" alt="The Role of HTML: Structuring Web Content" src="/static/imghw/default1.png"  /></a><a href="https://m.php.cn/faq/1796794180.html" title="The Role of HTML: Structuring Web Content" class="phphistorical_Version2_mids_title">The Role of HTML: Structuring Web Content</a><span class="Articlelist_txts_time">Apr 11, 2025 am	 12:12 AM</span><p class="Articlelist_txts_p">The role of HTML is to define the structure and content of a web page through tags and attributes. 1. HTML organizes content through tags such as , making it easy to read and understand. 2. Use semantic tags such as, etc. to enhance accessibility and SEO. 3. Optimizing HTML code can improve web page loading speed and user experience.</p></div><div class="phphistorical_Version2_mids"><a href="https://m.php.cn/faq/1796793634.html" title="HTML and Code: A Closer Look at the Terminology" class="phphistorical_Version2_mids_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                            data-src="https://img.php.cn/upload/article/001/253/068/174424853215422.jpg?x-oss-process=image/resize,p_40" alt="HTML and Code: A Closer Look at the Terminology" src="/static/imghw/default1.png"  /></a><a href="https://m.php.cn/faq/1796793634.html" title="HTML and Code: A Closer Look at the Terminology" class="phphistorical_Version2_mids_title">HTML and Code: A Closer Look at the Terminology</a><span class="Articlelist_txts_time">Apr 10, 2025 am	 09:28 AM</span><p class="Articlelist_txts_p">HTMLisaspecifictypeofcodefocusedonstructuringwebcontent,while"code"broadlyincludeslanguageslikeJavaScriptandPythonforfunctionality.1)HTMLdefineswebpagestructureusingtags.2)"Code"encompassesawiderrangeoflanguagesforlogicandinteract</p></div><div class="phphistorical_Version2_mids"><a href="https://m.php.cn/faq/1796793129.html" title="HTML, CSS, and JavaScript: Essential Tools for Web Developers" class="phphistorical_Version2_mids_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                            data-src="https://img.php.cn/upload/article/001/253/068/174412873346901.jpg?x-oss-process=image/resize,p_40" alt="HTML, CSS, and JavaScript: Essential Tools for Web Developers" src="/static/imghw/default1.png"  /></a><a href="https://m.php.cn/faq/1796793129.html" title="HTML, CSS, and JavaScript: Essential Tools for Web Developers" class="phphistorical_Version2_mids_title">HTML, CSS, and JavaScript: Essential Tools for Web Developers</a><span class="Articlelist_txts_time">Apr 09, 2025 am	 12:12 AM</span><p class="Articlelist_txts_p">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.</p></div><div class="phphistorical_Version2_mids"><a href="https://m.php.cn/faq/1796792987.html" title="The Roles of HTML, CSS, and JavaScript: Core Responsibilities" class="phphistorical_Version2_mids_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                            data-src="https://img.php.cn/upload/article/001/253/068/174411031220217.jpg?x-oss-process=image/resize,p_40" alt="The Roles of HTML, CSS, and JavaScript: Core Responsibilities" src="/static/imghw/default1.png"  /></a><a href="https://m.php.cn/faq/1796792987.html" title="The Roles of HTML, CSS, and JavaScript: Core Responsibilities" class="phphistorical_Version2_mids_title">The Roles of HTML, CSS, and JavaScript: Core Responsibilities</a><span class="Articlelist_txts_time">Apr 08, 2025 pm	 07:05 PM</span><p class="Articlelist_txts_p">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.</p></div><div class="phphistorical_Version2_mids"><a href="https://m.php.cn/faq/1796791823.html" title="Is HTML easy to learn for beginners?" class="phphistorical_Version2_mids_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                            data-src="https://img.php.cn/upload/article/001/253/068/174395586298618.jpg?x-oss-process=image/resize,p_40" alt="Is HTML easy to learn for beginners?" src="/static/imghw/default1.png"  /></a><a href="https://m.php.cn/faq/1796791823.html" title="Is HTML easy to learn for beginners?" class="phphistorical_Version2_mids_title">Is HTML easy to learn for beginners?</a><span class="Articlelist_txts_time">Apr 07, 2025 am	 12:11 AM</span><p class="Articlelist_txts_p">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.</p></div><div class="phphistorical_Version2_mids"><a href="https://m.php.cn/faq/1796791144.html" title="What is an example of a starting tag in HTML?" class="phphistorical_Version2_mids_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                            data-src="https://img.php.cn/upload/article/001/253/068/174386905283883.jpg?x-oss-process=image/resize,p_40" alt="What is an example of a starting tag in HTML?" src="/static/imghw/default1.png"  /></a><a href="https://m.php.cn/faq/1796791144.html" title="What is an example of a starting tag in HTML?" class="phphistorical_Version2_mids_title">What is an example of a starting tag in HTML?</a><span class="Articlelist_txts_time">Apr 06, 2025 am	 12:04 AM</span><p class="Articlelist_txts_p">AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.</p></div></div><a href="https://m.php.cn/web-designer.html" class="phpgenera_Details_mainL4_botton"><span>See all articles</span><img class="lazy" data-src="/static/imghwm/down_right.png" src="/static/imghw/default1.png" alt="" /></a></div><ins class="adsbygoogle"
     style="display:block"
     data-ad-format="fluid"
     data-ad-layout-key="-6t+ed+2i-1n-4w"
     data-ad-client="ca-pub-5902227090019525"
     data-ad-slot="8966999616"></ins><script>     (adsbygoogle = window.adsbygoogle || []).push({});
</script><div class="AI_ToolDetails_main4sR"><div class="phpgenera_Details_mainR3"><div class="phpmain1_4R_readrank"><div class="phpmain1_4R_readrank_top"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'"
                            onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                            data-src="/static/imghwm/hottools2.png" src="/static/imghw/default1.png" alt="" /><h2>Hot AI Tools</h2></div><div class="phpgenera_Details_mainR3_bottom"><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_top_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'"
                                    onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                                    data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411540686492.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undresser.AI Undress" /></a><div class="phpmain_tab2_mids_info"><a href="https://m.php.cn/ai/undresserai-undress" title="Undresser.AI Undress"class="phpmain_tab2_mids_title"><h3>Undresser.AI Undress</h3></a><p>AI-powered app for creating realistic nude photos</p></div></div><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_top_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'"
                                    onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                                    data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411552797167.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="AI Clothes Remover" /></a><div class="phpmain_tab2_mids_info"><a href="https://m.php.cn/ai/ai-clothes-remover" title="AI Clothes Remover"class="phpmain_tab2_mids_title"><h3>AI Clothes Remover</h3></a><p>Online AI tool for removing clothes from photos.</p></div></div><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_top_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'"
                                    onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                                    data-src="https://img.php.cn/upload/ai_manual/001/246/273/173410641626608.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undress AI Tool" /></a><div class="phpmain_tab2_mids_info"><a href="https://m.php.cn/ai/undress-ai-tool" title="Undress AI Tool"class="phpmain_tab2_mids_title"><h3>Undress AI Tool</h3></a><p>Undress images for free</p></div></div><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_top_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'"
                                    onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                                    data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411529149311.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Clothoff.io" /></a><div class="phpmain_tab2_mids_info"><a href="https://m.php.cn/ai/clothoffio" title="Clothoff.io"class="phpmain_tab2_mids_title"><h3>Clothoff.io</h3></a><p>AI clothes remover</p></div></div><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/ai/ai-hentai-generator" title="AI Hentai Generator" class="phpmain_tab2_mids_top_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'"
                                    onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                                    data-src="https://img.php.cn/upload/ai_manual/001/246/273/173405034393877.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="AI Hentai Generator" /></a><div class="phpmain_tab2_mids_info"><a href="https://m.php.cn/ai/ai-hentai-generator" title="AI Hentai Generator"class="phpmain_tab2_mids_title"><h3>AI Hentai Generator</h3></a><p>Generate AI Hentai for free.</p></div></div></div><div class="phpgenera_Details_mainR3_more"><a href="https://m.php.cn/ai">Show More</a></div></div></div><div class="phpgenera_Details_mainR4"><div class="phpmain1_4R_readrank"><div class="phpmain1_4R_readrank_top"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'"
                            onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                            data-src="/static/imghwm/hotarticle2.png" src="/static/imghw/default1.png" alt="" /><h2>Hot Article</h2></div><div class="phpgenera_Details_mainR4_bottom"><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.php.cn/faq/1796780570.html" title="R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)" class="phpgenera_Details_mainR4_bottom_title">R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)</a><div class="phpgenera_Details_mainR4_bottoms_info"><span>3 weeks ago</span><span>By尊渡假赌尊渡假赌尊渡假赌</span></div></div><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.php.cn/faq/1796780641.html" title="R.E.P.O. Best Graphic Settings" class="phpgenera_Details_mainR4_bottom_title">R.E.P.O. Best Graphic Settings</a><div class="phpgenera_Details_mainR4_bottoms_info"><span>3 weeks ago</span><span>By尊渡假赌尊渡假赌尊渡假赌</span></div></div><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.php.cn/faq/1796785841.html" title="Assassin's Creed Shadows: Seashell Riddle Solution" class="phpgenera_Details_mainR4_bottom_title">Assassin's Creed Shadows: Seashell Riddle Solution</a><div class="phpgenera_Details_mainR4_bottoms_info"><span>2 weeks ago</span><span>ByDDD</span></div></div><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.php.cn/faq/1796780520.html" title="R.E.P.O. How to Fix Audio if You Can't Hear Anyone" class="phpgenera_Details_mainR4_bottom_title">R.E.P.O. How to Fix Audio if You Can't Hear Anyone</a><div class="phpgenera_Details_mainR4_bottoms_info"><span>3 weeks ago</span><span>By尊渡假赌尊渡假赌尊渡假赌</span></div></div><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.php.cn/faq/1796779766.html" title="WWE 2K25: How To Unlock Everything In MyRise" class="phpgenera_Details_mainR4_bottom_title">WWE 2K25: How To Unlock Everything In MyRise</a><div class="phpgenera_Details_mainR4_bottoms_info"><span>4 weeks ago</span><span>By尊渡假赌尊渡假赌尊渡假赌</span></div></div></div><div class="phpgenera_Details_mainR3_more"><a href="https://m.php.cn/article.html">Show More</a></div></div></div><div class="phpgenera_Details_mainR3"><div class="phpmain1_4R_readrank"><div class="phpmain1_4R_readrank_top"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'"
                            onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                            data-src="/static/imghwm/hottools2.png" src="/static/imghw/default1.png" alt="" /><h2>Hot Tools</h2></div><div class="phpgenera_Details_mainR3_bottom"><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/toolset/development-tools/1545" title="SAP NetWeaver Server Adapter for Eclipse" class="phpmain_tab2_mids_top_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'"
                                        onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                                        data-src="https://img.php.cn/upload/manual/000/000/007/169165990824460.png" src="/static/imghw/default1.png" alt="SAP NetWeaver Server Adapter for Eclipse" /></a><div class="phpmain_tab2_mids_info"><a href="https://m.php.cn/toolset/development-tools/1545" title="SAP NetWeaver Server Adapter for Eclipse" class="phpmain_tab2_mids_title"><h3>SAP NetWeaver Server Adapter for Eclipse</h3></a><p>Integrate Eclipse with SAP NetWeaver application server.</p></div></div><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/toolset/development-tools/121" title="Zend Studio 13.0.1" class="phpmain_tab2_mids_top_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'"
                                        onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                                        data-src="https://img.php.cn/upload/manual/000/000/001/58ab97ecd1ab2670.jpg" src="/static/imghw/default1.png" alt="Zend Studio 13.0.1" /></a><div class="phpmain_tab2_mids_info"><a href="https://m.php.cn/toolset/development-tools/121" title="Zend Studio 13.0.1" class="phpmain_tab2_mids_title"><h3>Zend Studio 13.0.1</h3></a><p>Powerful PHP integrated development environment</p></div></div><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/toolset/development-tools/1579" title="SecLists" class="phpmain_tab2_mids_top_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'"
                                        onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                                        data-src="https://img.php.cn/upload/manual/000/000/008/169442209227215.jpg" src="/static/imghw/default1.png" alt="SecLists" /></a><div class="phpmain_tab2_mids_info"><a href="https://m.php.cn/toolset/development-tools/1579" title="SecLists" class="phpmain_tab2_mids_title"><h3>SecLists</h3></a><p>SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.</p></div></div><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_top_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'"
                                        onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                                        data-src="https://img.php.cn/upload/manual/000/000/001/58d0e0fc74683535.jpg" src="/static/imghw/default1.png" alt="Dreamweaver CS6" /></a><div class="phpmain_tab2_mids_info"><a href="https://m.php.cn/toolset/development-tools/469" title="Dreamweaver CS6" class="phpmain_tab2_mids_title"><h3>Dreamweaver CS6</h3></a><p>Visual web development tools</p></div></div><div class="phpmain_tab2_mids_top"><a href="https://m.php.cn/toolset/development-tools/1556" title="MantisBT" class="phpmain_tab2_mids_top_img"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'"
                                        onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                                        data-src="https://img.php.cn/upload/manual/000/000/004/169206588591843.png" src="/static/imghw/default1.png" alt="MantisBT" /></a><div class="phpmain_tab2_mids_info"><a href="https://m.php.cn/toolset/development-tools/1556" title="MantisBT" class="phpmain_tab2_mids_title"><h3>MantisBT</h3></a><p>Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.</p></div></div></div><div class="phpgenera_Details_mainR3_more"><a href="https://m.php.cn/ai">Show More</a></div></div></div><div class="phpgenera_Details_mainR4"><div class="phpmain1_4R_readrank"><div class="phpmain1_4R_readrank_top"><img onerror="this.onerror=''; this.src='/static/imghwm/default1.png'"
                            onerror="this.onerror=''; this.src='/static/imghwm/default1.png'" class="lazy"
                            data-src="/static/imghwm/hotarticle2.png" src="/static/imghw/default1.png" alt="" /><h2>Hot Topics</h2></div><div class="phpgenera_Details_mainR4_bottom"><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.php.cn/faq/gmailyxdlrkzn" title="Where is the login entrance for gmail email?"  class="phpgenera_Details_mainR4_bottom_title">Where is the login entrance for gmail email?</a><div class="phpgenera_Details_mainR4_bottoms_info"><div class="phpgenera_Details_mainR4_bottoms_infos"><img class="lazy" data-src="/static/imghwm/eyess.png" src="/static/imghw/default1.png"
                                        alt="" /><span>7488</span></div><div class="phpgenera_Details_mainR4_bottoms_infos"><img class="lazy" data-src="/static/imghwm/tiezi.png" src="/static/imghw/default1.png"
                                        alt="" /><span>15</span></div></div></div><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.php.cn/faq/cakephp-tutor" title="CakePHP Tutorial"  class="phpgenera_Details_mainR4_bottom_title">CakePHP Tutorial</a><div class="phpgenera_Details_mainR4_bottoms_info"><div class="phpgenera_Details_mainR4_bottoms_infos"><img class="lazy" data-src="/static/imghwm/eyess.png" src="/static/imghw/default1.png"
                                        alt="" /><span>1377</span></div><div class="phpgenera_Details_mainR4_bottoms_infos"><img class="lazy" data-src="/static/imghwm/tiezi.png" src="/static/imghw/default1.png"
                                        alt="" /><span>52</span></div></div></div><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.php.cn/faq/steamdzhmcssmgs" title="What is the format of the account name of steam"  class="phpgenera_Details_mainR4_bottom_title">What is the format of the account name of steam</a><div class="phpgenera_Details_mainR4_bottoms_info"><div class="phpgenera_Details_mainR4_bottoms_infos"><img class="lazy" data-src="/static/imghwm/eyess.png" src="/static/imghw/default1.png"
                                        alt="" /><span>77</span></div><div class="phpgenera_Details_mainR4_bottoms_infos"><img class="lazy" data-src="/static/imghwm/tiezi.png" src="/static/imghw/default1.png"
                                        alt="" /><span>11</span></div></div></div><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.php.cn/faq/winactivationkeyper" title="win11 activation key permanent"  class="phpgenera_Details_mainR4_bottom_title">win11 activation key permanent</a><div class="phpgenera_Details_mainR4_bottoms_info"><div class="phpgenera_Details_mainR4_bottoms_infos"><img class="lazy" data-src="/static/imghwm/eyess.png" src="/static/imghw/default1.png"
                                        alt="" /><span>51</span></div><div class="phpgenera_Details_mainR4_bottoms_infos"><img class="lazy" data-src="/static/imghwm/tiezi.png" src="/static/imghw/default1.png"
                                        alt="" /><span>19</span></div></div></div><div class="phpgenera_Details_mainR4_bottoms"><a href="https://m.php.cn/faq/newyorktimesdailybrief" title="nyt connections hints and answers"  class="phpgenera_Details_mainR4_bottom_title">nyt connections hints and answers</a><div class="phpgenera_Details_mainR4_bottoms_info"><div class="phpgenera_Details_mainR4_bottoms_infos"><img class="lazy" data-src="/static/imghwm/eyess.png" src="/static/imghw/default1.png"
                                        alt="" /><span>19</span></div><div class="phpgenera_Details_mainR4_bottoms_infos"><img class="lazy" data-src="/static/imghwm/tiezi.png" src="/static/imghw/default1.png"
                                        alt="" /><span>40</span></div></div></div></div><div class="phpgenera_Details_mainR3_more"><a href="https://m.php.cn/faq/zt">Show More</a></div></div></div></div></main><ins class="adsbygoogle"
     style="display:block"
     data-ad-format="autorelaxed"
     data-ad-client="ca-pub-5902227090019525"
     data-ad-slot="5027754603"></ins><script>     (adsbygoogle = window.adsbygoogle || []).push({});
</script><footer><div class="footer"><div class="footertop"><img src="/static/imghwm/logo.png" alt=""><p>Public welfare online PHP training,Help PHP learners grow quickly!</p></div><div class="footermid"><a href="https://m.php.cn/about/us.html">About us</a><a href="https://m.php.cn/about/disclaimer.html">Disclaimer</a><a href="https://m.php.cn/update/article_0_1.html">Sitemap</a></div><div class="footerbottom"><p>                © php.cn All rights reserved
            </p></div></div></footer><script>isLogin = 0;</script><script type="text/javascript" src="/static/layui/layui.js"></script><script type="text/javascript" src="/static/js/global.js?4.9.47"></script><script src="https://vdse.bdstatic.com//search-video.v1.min.js"></script><link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css' type='text/css' media='all'/><script type='text/javascript' src='/static/js/viewer.min.js?1'></script><script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script><script>  var _paq = window._paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="https://tongji.php.cn/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '9']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
  })();
</script><script>        jQuery.fn.wait = function (func, times, interval) {
            var _times = times || -1, //100次
            _interval = interval || 20, //20毫秒每次
            _self = this,
            _selector = this.selector, //选择器
            _iIntervalID; //定时器id
            if( this.length ){ //如果已经获取到了,就直接执行函数
                func && func.call(this);
            } else {
                _iIntervalID = setInterval(function() {
                    if(!_times) { //是0就退出
                        clearInterval(_iIntervalID);
                    }
                    _times <= 0 || _times--; //如果是正数就 --

                    _self = $(_selector); //再次选择
                    if( _self.length ) { //判断是否取到
                        func && func.call(_self);
                        clearInterval(_iIntervalID);
                    }
                }, _interval);
            }
            return this;
}

    $("table.syntaxhighlighter").wait(function() {
        $('table.syntaxhighlighter').append("<p class='cnblogs_code_footer'><span class='cnblogs_code_footer_icon'></span></p>");
    });
    $(document).on("click", ".cnblogs_code_footer",function(){
        $(this).parents('table.syntaxhighlighter').css('display','inline-table');$(this).hide();
    });
    $('.nphpQianCont').viewer({navbar:true,title:false,toolbar:false,movable:false,viewed:function(){$('img').click(function(){$('.viewer-close').trigger('click');});}});
    </script><script>// 通用函数,用于显示或隐藏元素
function toggleElementsDisplay(className, show) {
  const elements = document.getElementsByClassName(className);
  for (let i = 0; i < elements.length; i++) {
    elements[i].style.display = show ? "block" : "none";
  }
}
// 页面加载完成后执行的主函数
document.addEventListener("DOMContentLoaded", () => {
  // 1. 绑定菜单按钮事件
  const bindMenuEvents = () => {
    const toggleDisplay = (className, show, eventId) => {
      const element = document.getElementById(eventId);
      if (element) {
        element.addEventListener("click", (event) => {
          event.preventDefault();
          toggleElementsDisplay(className, show);
        });
      }
    };
    toggleDisplay("m_editormain12main", true, "fixed_tab_img");
    toggleDisplay("m_editormain12main", false, "fixed_tab_topi");
    toggleDisplay("m_editormain12main", false, "fixed_tab_close");
    toggleDisplay("m_menu", true, "lan1sp");
    toggleDisplay("m_menu", false, "m_editormain12main_topi_sp");
    toggleDisplay("m_menu_lang", true, "lan1");
    toggleDisplay("m_menu_lang", false, "m_editormain12main_topi_lan");
  };
 // 2. 绑定滚动链接事件
const bindScrollLinks = () => {
  const titleList = document.getElementById("fixed_tab_titlelist");
  const menuMain = document.getElementsByClassName("m_editormain12main")[0];
  const links = document.querySelectorAll('.fixed_tab_a'); 
  links.forEach(linkElement => {
    if (linkElement) {
      linkElement.addEventListener("click", async (e) => {
        e.preventDefault();
        e.stopPropagation();
        // 先隐藏菜单
        if (menuMain) menuMain.style.display = "none";
        if (titleList) titleList.style.display = "none";
        // 获取目标元素的 ID
        const targetId = linkElement.getAttribute('href').substring(1);
        const targetElement = document.getElementById(targetId);
        // 等待 DOM 更新
        await new Promise(resolve => requestAnimationFrame(resolve));
        // 滚动到目标位置
        if (targetElement) {
          targetElement.scrollIntoView({
            behavior: "smooth",
            block: "start"
          });
        }
      });
    }
  });
};
  // 3. 绑定关闭按钮事件
  const bindCloseButton = () => {
    const closeButton = document.querySelector(".phpgenera_Details_mainR1_close");
    const container = document.querySelector(".phpgenera_Details_mainR1");
    if (closeButton && container) {
      closeButton.addEventListener("click", (event) => {
        event.preventDefault();
        container.style.display = "none";
      });
    }
  };
  // 4. 初始化菜单交互功能
  const initMenuInteraction = () => {
    const menuGroupElements = document.querySelectorAll('.layui-menu-item-group');
    menuGroupElements.forEach(menuItem => {
      menuItem.addEventListener('click', function(event) {
        if (event.target.closest('.m_menusnames')) {
          return;
        }
        this.classList.toggle('layui-menu-item-down');
        this.classList.toggle('layui-menu-item-up');
        const subMenuContainer = this.querySelector('.m_menusnames');
        const icon = this.querySelector('.layui-icon');
        if (subMenuContainer && icon) {
          if (this.classList.contains('layui-menu-item-down')) {
            subMenuContainer.style.display = 'block';
            icon.classList.remove('layui-icon-down');
            icon.classList.add('layui-icon-up');
          } else {
            subMenuContainer.style.display = 'none';
            icon.classList.remove('layui-icon-up');
            icon.classList.add('layui-icon-down');
          }
        }
      });
    });
  };
  // 5. 初始化 layui 功能
  const initLayui = () => {
    if (typeof layui !== 'undefined') {
      layui.use(function () {
        var util = layui.util;
        if (util && util.fixbar) {
          util.fixbar({
            on: {
              mouseenter: function (type) {
                if (layer && layer.tips) {
                  layer.tips(type, this, {
                    tips: 4,
                    fixed: true,
                  });
                }
              },
              mouseleave: function (type) {
                if (layer && layer.closeAll) {
                  layer.closeAll("tips");
                }
              },
            },
          });
        }
      });
    }
  };
  // 执行所有初始化函数
  bindMenuEvents();
  bindScrollLinks();
  bindCloseButton();
  initMenuInteraction();
  initLayui();
});
    </script></body></html>