答案 0 :(得分:0)
使用
JavaScript-Event-Binding
并使用event.preventDefault()
而不是接近onsubmit="return selection()"
$('#product_configure_form').on('submit', function(e) {
e.preventDefault();
alert('Form submission is prevented..');
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<form class="add-to-cart clearfix" action="http://www.photographycoursetour.com/cart/add/46111438/" id="product_configure_form" method="post">
<input type="text">
<input type="submit">
</form>
&#13;