Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.5k views
in Technique[技术] by (71.8m points)

php 如何用条件判断div的显示与隐藏

<div>a=1时显示</div>

以上div以a=1时为条件出现,否则隐藏,请大神们告诉我具体的写法,感谢你们!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

你这是用php输出html页面吧

要的是这个?


<?php
if($a == 1){
echo "<div></div>";
}
?>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...