Home  >  Article  >  Backend Development  >  怎么实现radio的显示与隐藏

怎么实现radio的显示与隐藏

WBOY
WBOYOriginal
2016-06-13 12:41:571173browse

如何实现radio的显示与隐藏
从数据库中查询出一套单选题,

    <?php foreach($list as $k=>$v){ ?><br />
                       <ul><br />
                    <li><?php echo $v['id'];?>、<?php echo $v['sub'];?></li><br />
                    <li><input type="radio" name="<?php echo $k['id'];?>" value="Y" />是</li><br />
                    <li><input type="radio" name="<?php echo $k['id'];?>" value="N" />否</li><br />
                    <li><input type="radio" name="<?php echo $k['id'];?>" value="?" />?</li><br />
               </ul><br />
                       <?php } ?><br />


如上代码是从数据库查询出来后显示在页面的代码,
如何实现,显示的时候只显示一个UL?
当点击radio按钮后,隐藏当前UL,显示下一个UL?

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