<script type="text/javascript">
function Add () {
document.getElementById("newCart.php").submit();
document.getElementById("PreviousCarts.php").submit();
}
</script>
HTML:
<form name="myform" Id="myform" action="POST" method ="POST" data-ajax="false">
<div class="main-content-wrapper">
<div class="image box-right" style="text-align: center"><img src="pic/shoping cart.jpg" border="0" width="150" height="150"
title="go to a new cart!" onclick="if (validateEmail()) { Add ();} else {return false;}">
<span class="style1"><strong><br>New Shop Cart</strong></span> </div>
<div class="image box-left" style="text-align: center"><img src="pic/page_accept .png" border="0" width="150" height="150"
title="go to a your old shopping bag!" onclick="if (validateEmail()) { Add ();} else {return false;}">
<span class="style1"><strong><br>your Previous shopping carts</strong></span></div>
我们想做 post 或 to form namenewcart
或 to form previouscart
。我们尝试了这段代码,但它不起作用。你有推荐吗?