使用bootstrap 弹窗 点击enter键会刷新当前页面
  • 代码如下
<form class="form-horizontal" style="margin-left:-50px;" id="wordSolt-form">
    <div class="form-group">
        <label for="inputEmail3" class="col-sm-3 control-label">词典名称</label>
        <div class="col-sm-9">
            <input type="text" class="form-control"  style="width:60%;" id="dictName" placeholder="请输入词典名称">
        </div>
    </div>
    <div class="form-group">
        <label for="inputEmail3" class="col-sm-3 control-label">词典类型</label>
        <div class="col-sm-9">
            <div class="radio" style="width:100%;">
                <label>
                    <input type="radio" name="dictType" id="optionsRadios1" value="true" checked>
                    可枚举型 <a style="color: grey;margin-left: 10px;    text-decoration-line: none;">能够列出词典中所有值的词典,如商品类别、产品型号等</a>
                </label>
            </div>
            <div class="radio " style="width:100%;">
                <label>
                    <input type="radio" name="dictType" id="optionsRadios2" value="false">
                    不可枚举型<a style="color: grey;margin-left: 10px;    text-decoration-line: none;">无法列出词典中所有值的词典,如合同号、用户UID等</a>
                </label>
            </div>
        </div>
    </div>
</form>
  • 解决办法: 把form改为div
<div class="form-horizontal" style="margin-left:-50px;" id="wordSolt-form">
    <div class="form-group">
        <label for="inputEmail3" class="col-sm-3 control-label">词典名称</label>
        <div class="col-sm-9">
            <input type="text" class="form-control"  style="width:60%;" id="dictName" placeholder="请输入词典名称">
        </div>
    </div>
    <div class="form-group">
        <label for="inputEmail3" class="col-sm-3 control-label">词典类型</label>
        <div class="col-sm-9">
            <div class="radio" style="width:100%;">
                <label>
                    <input type="radio" name="dictType" id="optionsRadios1" value="true" checked>
                    可枚举型 <a style="color: grey;margin-left: 10px;    text-decoration-line: none;">能够列出词典中所有值的词典,如商品类别、产品型号等</a>
                </label>
            </div>
            <div class="radio " style="width:100%;">
                <label>
                    <input type="radio" name="dictType" id="optionsRadios2" value="false">
                    不可枚举型<a style="color: grey;margin-left: 10px;    text-decoration-line: none;">无法列出词典中所有值的词典,如合同号、用户UID等</a>
                </label>
            </div>
        </div>
    </div>
</div>

扫描二维码,在手机上阅读!