日期:2014-05-17 浏览次数:20580 次
<script language="javascript" type="text/javascript"> var flag1=0; var flag2=0; function NumberInc() { if(flag1==1 && flag2==1) {alert("Error!");} else { if(flag1==1) { document.all.textbox_qty.value++; setTimeout("NumberInc()",100); } if(flag2==1) { document.all.textbox_qty.value--; setTimeout("NumberInc()",100); } } } function md(obj) { if(obj.id=="Button1") flag1=1; if(obj.id=="Button2") flag2=1; NumberInc(); } function mo(obj) { if(obj.id=="Button1") flag1=0; if(obj.id=="Button2") flag2=0; } </script>
while($get_details=mysql_fetch_array($result)) { //.... echo "<form name='shopping_cart_form' method='post' action='include/shopping_cart_form.php' onsubmit='return dosubmit(this);'>"; echo "<div id='item_details' style=''>"; echo "<div id='item_label'>"; echo "<div id='dish_price'>"; echo "<a style='font-size:30pt; margin-top:20px; float:left;'>\$</a>"; echo "<a style='font-size:50pt; margin-top:40px; float:left;'>$prices[0]</a>"; echo "<a style='font-size:10pt; margin-top:40px; float:left;'>.</a>"; echo "<a style='font-size:20pt; margin-top:30px; float:left;'>$prices[1]</a>"; echo "</div>"; echo "<div id='dish_img'><img src='css_and_img/$dish_img' style='width: 320px; height:160px; border:none' border=none></div>"; echo "</div>"; echo "<div id='item_info'> "; echo "<div id='dish_name'>$dish_name</div>"; echo "<div id='dish_descr'>Description: $dish_descr</div>"; echo "<div id='add_to_function'> Qty:"; echo "<input type=‘button’ ID=‘Button2’ value=‘-’ onMouseDown=‘md(this)’ onMouseOut=‘mo(this)’ onMouseUp=‘mo(this)’ >"; echo "<input class=’txt_qty‘ type=’text‘ name=’textbox_qty‘ id=‘textbox_qty’ value=‘1’ $disabled/>"; echo "<input type=‘button’ ID=‘Button1’ value=‘+’ onMouseDown=‘md(this)’ onMouseOut=‘mo(this)’ onMouseUp=‘mo(this)’ >"; echo "<input class='add_button' type='submit' name='btn_add' id='btn_add' value='Add to Cart' $disabled/>"; echo "</div>"; echo "</div>"; echo "</div>"; echo "</br>"; echo "</form>"; }