<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <link href="<?php echo base_url('/js/jquery.mobile-1.4.5.css'); ?>" rel="stylesheet" type="text/css"/> <link rel="stylesheet" href="<?php echo base_url('/themes/redsoft.min.css'); ?>" /> <link rel="stylesheet" href="<?php echo base_url('/themes/jquery.mobile.icons.min.css'); ?>" /> <script src="<?php echo base_url('/js/jquery-1.11.3.min.js'); ?>" type="text/javascript"></script> <script src="<?php echo base_url('/js/jquery.mobile-1.4.5.js'); ?>" type="text/javascript"></script> </head> <!--<div data-role="page" id="page5"> --> <div data-role="header"> <h1>Products on Your Shopping Cart</h1> </div> <body> <div id='content'> <div id='tag'> <!--<img src='<?php echo base_url('/img/');?>'><br>--> <!--echo "<td style=\"border-style: none; border-width: medium\"><center><img width='40%' src='".base_url('/img/')."/".$row->files.".jpg'><br>".$row->name."<br>"; --> </div> <div id="cart" > <!--<div id = "heading"> <h2 align="center"></h2> </div> --> <div id="text"> </div> <table id="table" border="5" cellpadding="5px" cellspacing="1px"> <table border="2" align="center" width="60%"> <tr> <td>Serial</td> <td>Name</td> <td>Price</td> <td>Qty</td> <td>Amount</td> <td>Cancel</td> </tr> <?php $result_order= $this->db->where('userID',$this->session->userdata('IDname'))->get('order')->result(); //print_r($result_order); foreach ($result_order as $row => $item) { echo'<tr>'; echo'<td>'.$item->foodID.'</td>'; echo'<td>'.$item->foodname.'</td>'; echo'<td>'.$item->cost.'</td>'; echo'<td width="55"><input type="number" name="items_qty[<?php echo $row; ?>]" id="item<?php echo $row; ?>_qty" min="1" max="10"></td>'; echo'<td> '.$item->cost.'*$item_qty </td>'; echo'<td> </td>'; echo'</tr> '; } ?> </table> </div> </div> <div data-role="footer" data-position="fixed"> <h4>Grub and Goodies</h4> </body> </html>
<!doctype html> <html> <head> <meta charset="utf-8"> <script src="/js/jquery-2.1.1.min.js"></script> <script> $(document).ready(function(){ $('.qty_input').change(function(){ var tr = $(this).parent().parent(); var qty=$(this).val(); var price = tr.find('td').eq(0).html(); tr.find('td').eq(2).html(qty * price); }) }) </script> </head> <table> <tr> <td>120</td> <td><input class="qty_input" name="xxx1" ></td> <td>-</td> </tr> <tr> <td>150</td> <td><input class="qty_input" name="xxx2" ></td> <td>-</td> </tr> </table> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง