|  | 
	                
  
    | 
	 
        สอบถามหน่อยครับพี่ ผมอยาก Copy ข้อมูล text 4 ช่องแถวแรก ให้ไปโชว์ในแถวที่2     |  
    |  |  
 
              
  
    | 
 
        
          |  |  |  |  |  
          |  |  | 
            
              | เอา code มาดู 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2019-10-04 16:37:58 | By :
                            Genesis™ |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              | Code (PHP) 
 <form action="phpMySQLAddSave.php" name="frmAdd" method="post">
<td> </td>
<td> </td>
Select Line : 
<select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
<?php
for($i=1;$i<=50;$i++)
{
	if($_GET["Line"] == $i)
	{
		$sel = "selected";
	}
	else
	{
		$sel = "";
	}
?>
	<option value="<?php echo $_SERVER["PHP_SELF"];?>?Line=<?php echo $i;?>" <?php echo $sel;?>><?php echo $i;?></option>
<?php
}
?>
</select>
Select Line :
<input type="text" name ="Tdate_pack" id="datepicker1"autocomplete="off" />
Select Line :
 <select name="list2" style="width:330px;" id="list2">
   <option  value="">  </option>
     <?
	  
        $objConnect = mysql_connect("localhost","root","root") or die("Error Connect to Database");
        $objDB = mysql_select_db("truck_service");
        mysql_query("SET NAMES UTF8");
           $result = mysql_query("SELECT *  FROM  customer order by id ASC");
           while($row = mysql_fetch_array($result)){
        ?>
      <option value="<?php echo $row['name_customer'];?>"><?php echo $row['name_customer'];?></option>
      <? }
	  mysql_close();
	   ?>
   </select>
  <a href="add_cus.php"onClick="NewWindow(this.href,'name','560','230','yes');return false"><img src="Pic/addhr.png"title="เพิ่มสายข้อมูลลูกค้า"name="Image4" width="25" height="25" ></a>
<table align="center" width="600" border="1">
  <tr>
    <th width="91"> <div align="center">Model name </div></th>
    <th width="160"> <div align="center">Lot </div></th>
    <th width="198"> <div align="center">Amount</div></th>
    <th width="97"> <div align="center">NG </div></th>
	<th width="97"> <div align="center">Copy</div></th>
 
  </tr>
  <?php
  $line = $_GET["Line"];
  if($line == 0){$line=1;}
  for($i=1;$i<=$line;$i++)
  {
  ?>
  
  
  
  <tr align="center">
    <td><input type="text" name="Tmodel<?php echo $i;?>" id="Tmodel" size="5"></td>
    <td><input type="text" name="TLot<?php echo $i;?>" id="TLot" size="20"></td>
    <td><input type="text"OnKeyPress="return chkNumber(this)" name="TAmount<?php echo $i;?>" id="TAmount" size="20"></td>
    <td><input type="text" OnKeyPress="return chkNumber(this)" name="Tng<?php echo $i;?>" id="Tng" size="2"></td>
	<td><input type="button" value="++"></td>
  </tr>
<?php
}
?>
  </table>
  <input type="submit" name="submit" value="submit">
  <input type="hidden" name="hdnLine" value="<?php echo $i;?>">
  </form>
</body>
</html>
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2019-10-05 08:16:23 | By :
                            pannawitaim |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              | Code (PHP) 
 <table id="myTable">
    <tr align="center" id="tr1">
        <td><input type="text" id="Tmodel" size="5"></td>
        <td><input type="text" id="TLot" size="20"></td>
        <td><input type="text" id="TAmount1" size="20"></td>
        <td><input type="text" id="Tng" size="2"></td>
        <td><button id="btnPlus" rel="1" type="button">+</button></td>
     </tr>
</table>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
    $(document).ready(function(){
        
        $('#myTable').on('click','#btnPlus',function(e){
            e.preventDefault();
            
            var rel=$(this).attr('rel');
            $('#tr'+rel).clone().appendTo('#myTable');
        });
        
    });
</script>
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2019-10-05 14:46:32 | By :
                            Genesis™ |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              | ขอบคุณครับ 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2019-10-11 09:07:26 | By :
                            pannawitaim |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  |  |