
[英]How to stop previous song after clicking next images by using JavaScript
[英]How to stop proceeding to the next POP box even after clicking on Ok in wordpress using javascript?
现在,当我没有单击任何复选框时,它显示错误请选择一个选项,但是当我单击``确定''按钮时,它将继续其他弹出表单。我要保留在同一弹出页面上。这是我的弹出表单代码:
function valthisform() { var checkboxes = document.querySelectorAll('input[type="checkbox"]'); var checkedOne = Array.prototype.slice.call(checkboxes).some(x => x.checked); if (checkedOne == true) { } else { alert ("Kindly select at least one option !") form.reload(); } }
<form name="myform"> <div id="outer-container"> <label class="ac-service"> Choose Your Service </label> <br> <hr/> <label id="l-1"><input type="checkbox" id="c1" name="checkboxes">AC Not Cooling Properly/Repair</label> <ul class="u"> <li>Complete Diagnosis</li> <li>Final Charges Based on Inspection</li> </ul> <hr/> <label id="l-1"><input type="checkbox" id="c1" name="checkboxes">Wet Servicing</label> <ul class="u"> <li>Deep Cleaning the AC for fresh air</li> <li>Filter, coils etc. cleaned with water</li> <li>Save upto 20% on your summer electricity bill with regular servicing </li> </ul> <hr/> <label id="l-1"><input type="checkbox" id="c1" name="checkboxes">Installation</label> <ul class="u"> <li>Parts & wall modification charges extra</li> </ul> <hr/> <label id="l-1"><input type="checkbox" id="c1" name="checkboxes">Uninstallation</label> <hr/> <label id="l-1"><input type="checkbox" id="c1" name="checkboxes">Gas Charging</label> <ul class="u"> <li>Complete vacuuming and gas filing</li> <li>Partial gas refilling/top-up is not recommended</li> <li>Minor leakages will be fixed</li> <li>Leakage check with Nitrogen is not included</li> </ul> <hr/> <input type="button" id="fixed-button" onclick="return valthisform(this.form);" value="Next" class="popmake-391"> </div> </form>
我正在使用popup maker在wordpress中创建弹出窗口,并与form 7联系以创建表单。
谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.