我有两个形状足的按钮。第一个应该使用如何使用提示加载不同的页面,第二个触发弹出窗口。第一个只有属性,第二个具有绑定的jquery事件,点击有效。但是在MS Edge上,第一个按钮加载了在第二个btn触发的弹出交互之后加载的页面。这只发生在Edge上。它适用于IE 11,Chrome& Firefox浏览器。有什么解决方案吗?我错过了什么吗?
<form method="POST" id="start-exam-form" novalidate="novalidate">
<input type="hidden" name="csrfmiddlewaretoken" value="nFgf0NGZKushRlwFnTc3AAsB7JFMTAG5">
<div class="form-body">
<div class="form-row">
<label class="form-label">First name *</label>
<div class="form-controls">
<input class="field" data-msg-required="*This field is required." data-rule-required="true" id="id_first_name" maxlength="50" name="first_name" placeholder="" type="text" value="martin" aria-required="true">
</div><!-- /.form-controls -->
</div><!-- /.form-row -->
<div class="form-row">
<label class="form-label">Last name *</label>
<div class="form-controls">
<input class="field" data-msg-required="*This field is required." data-rule-required="true" id="id_last_name" maxlength="50" name="last_name" placeholder="" type="text" value="todorov" aria-required="true">
</div><!-- /.form-controls -->
</div><!-- /.form-row -->
<div class="form-row">
<div class="form-controls">
<div class="checkbox-wrapper">
<input data-msg-required="*Please confirm your identity." data-rule-required="true" id="id_confirm_identity" name="confirm_identity" type="checkbox" checked="checked" aria-required="true">
<label for="id_confirm_identity">
<span class="checkbox"></span>
<span>I confirm my identity</span>
</label>
</div> <!-- /.checkbox-wrapper -->
</div> <!-- /.form-controls -->
</div> <!-- /.form-row -->
<div class="form-row">
<div class="form-controls">
<div class="checkbox-wrapper">
<input data-msg-required="*Please accept our policy." data-rule-required="true" id="id_is_accepted_terms" name="is_accepted_terms" type="checkbox" checked="checked" aria-required="true">
<label for="id_is_accepted_terms">
<span class="checkbox"></span>
<span>I agree to the <a href="/terms-and-conditions">T&C</a> and <a href="/privacy-policy">Privacy Policy</a></span>
</label>
</div> <!-- /.checkbox-wrapper -->
</div> <!-- /.form-controls -->
</div> <!-- /.form-row -->
<div class="form-row">
<div class="form-controls">
<div class="checkbox-wrapper">
<input id="id_receive_future_job_offers" name="receive_future_job_offers" type="checkbox">
<label for="id_receive_future_job_offers">
<span class="checkbox"></span>
<span>I want to receive future job offers</span>
</label>
</div> <!-- /.checkbox-wrapper -->
</div> <!-- /.form-controls -->
</div> <!-- /.form-row -->
</div><!-- /.form-body -->
<div class="form-foot">
<button name="start_exam_guide_btn" type="submit" form="start-exam-form" class="btn btn-white start-exam-guide-btn" value="start-guide"><span>Exam guide</span></button>
<button class="btn btn-green-light start-exam-button"><span>Start Exam</span></button>
</div><!-- /.form-foot -->
</form>
答案 0 :(得分:1)
您的type="submit"
位于加载指南的按钮上。
因此,单击其他按钮将不会执行任何操作。
如果你正在使用bootstrap,而你似乎是,我会把指南按钮留作按钮类的链接
<a class="btn btn-white start-exam-guide-btn" href="<your link"><span>Exam guide</span></a>
将type="submit"
移至另一个按钮