>" is enough."/> >" is enough.">
search
HomeBackend DevelopmentPHP ProblemHow to hide tags in php

How to hide tags in php

Mar 11, 2021 am 09:45 AM
php

How to implement hidden tags in php: first open the corresponding PHP sample file; then make a mark flag in php and pass it over; finally add "

>" is enough.

How to hide tags in php

The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer

Specific questions:

About the problem of hiding the div tag in PHP

<div id="tes">test</div>
<input type="submit" onclick="a();" value="test" />
<?php
function a(){
echo "<script type=&#39;text/javascript&#39;> document.getElementById(&#39;tes&#39;).style.display=&#39;none&#39;; </script>";
}
?>

What's wrong? If this function needs to be modified, how should it be modified?

Solution:

1. Because the hiding of the div tag itself is controlled by css style, that is,

So the question will change to controlling the display in style

2. Answer the question in Part 1, make a mark flag in php and pass it over, and then in the html page

>
When the flag is set to true, it is hidden. When false, it will be displayed.

[Recommended learning: "PHP Video Tutorial"]

The above is the detailed content of How to hide tags in php. For more information, please follow other related articles on the PHP Chinese website!

Statement
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

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

MantisBT

MantisBT

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.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment