首页 > 其他 > 详细

前端总结

时间:2020-06-09 16:26:17      阅读:35      评论:0      收藏:0      [点我收藏+]

控制设备显隐

方法一:

<input type="button" id="sfsfd" style="margin-left: 10px" onclick="SelectVisible()" class=" btn" />


<div id="collapseTwo" style="display: none">
                        <div class="row" style="padding-top: 10px;">
                            <div class="col-xs-12">
                                <div class="col-xs-2">
                                    <input type="text" class="form-control" id="22" placeholder="请输入学号" />
                                </div>
                                <div class="col-xs-2">
                                    <input type="text" class="form-control" id="33" placeholder="请输入姓名" />
                                </div>
                                <div class="col-xs-2">
                                    <button class="btn btn-primary btn-sm" id="44">查询</button>
                                    <button class="btn btn-sm" id="23">重置</button>
                                </div>
                            </div>
                        </div>
                    </div>



   function SelectVisible() {
                var divp = document.getElementById(‘collapseTwo‘);
                debugger;
                if (divp.style.display == "none") {
                    divp.style.display = "block"; 
            }
            else if (divp.style.display == "block") {
                divp.style.display = "none";
            }

方法二:  https://blog.csdn.net/qq_37103514/article/details/80897545

 

前端总结

原文:https://www.cnblogs.com/NetNotes/p/13073067.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!