当改变内部输入状态时,模态关闭

时间:2017-08-04 10:28:06

标签: twitter-bootstrap bootstrap-modal

我有这个模态。当我按下按钮" CHANGE"我想启用输入contactModalPhoneInput。当我点击按钮它会立即关闭模态时会发生什么。当我重新打开它时,它有效地启用了输入。有任何想法吗?

            
            <!-- Modal content-->
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                    <h4 class="modal-title">Results</h4>
                </div>
                <div class="modal-body">
                    <div class="input-group input-group-md">
                        <span class="input-group-addon" id="sizing-addon1"><i class="fa fa-user" aria-hidden="true"></i></span>
                        <input type="text" class="form-control" id="contactModalPhoneInput" placeholder="Name" aria-describedby="basic-addon1" disabled/>
                    </div>
                    <br>
                    <button type="button" class="btn btn-danger pull-right" data-dismiss="modal" id="btnChangePhone" onclick="changeInputState()">Change</button>
                                       更新                     关                              
    </div>

1 个答案:

答案 0 :(得分:1)

删除&#39; data-dismiss =&#34; modal&#34;&#39;来自你的btnChangePhone