<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-874" /> <title></title> <script language="javascript"> function IsNumeric(sText,obj) { var ValidChars = "0123456789."; var IsNumber=true; var Char; for (i = 0; i < sText.length && IsNumber == true; i++) { Char = sText.charAt(i); if (ValidChars.indexOf(Char) == -1) { IsNumber = false; } } if(IsNumber==false){ alert("ใส่เฉพาะตัวเลขเท่านั้น"); obj.value=sText.substr(0,sText.length-1); } } </script> </head> <body> <form name="form1" method="post" action=""> <input name="mynumber" type="text" id="mynumber" onKeyUp="IsNumeric(this.value,this)"> </form> </body> </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>รายละเอียดอุปกรณ์</title> <style type="text/css"> <!-- a:link { text-decoration: none; } tr { color: #FFF; } tr { color: #000; } body,td,th { font-size: 14px; } --> </style> </head> <body background="bg.jpg"> <body bgcolor="#EEF2F7"><form name="form1" method="post" action="search_ipvlan.php?sort=switch"> <div align="center"> <p> </p> <p>ค้นหา <input type="text" name="search" /> <input type="submit" name="Submit" value="ค้นหา" /> <span style="text-decoration: none"><a href="for_staff.php"> <span style="text-decoration: none">กลับหน้าหลัก</span></a></span> </div> </form> <title> ???????????????? MySQL</title> <meta http-equiv="Content-Type" content="text/html; charset=tis-620"> <table width="100%" border="1"> <tr bgcolor="#FF6600"> <td width="5%" align="center" nowrap>ลำดับที่</a></td> <td width="10%" align="center" nowrap><a href="show_temp.php?sort=cab">CAB</a></td> <td width="10%" align="center" nowrap><a href="show_temp.php?sort=ip">IP Address</a></span></div> <td width="10%" align="center" nowrap><a href="show_temp.php?sort=temp">Temperature</a></span></div> <td width="8%" align="center" nowrap>Date</a></span></div> <td width="8%" align="center" nowrap>Edit</a></span></div> <td width="8%" align="center" nowrap>Delete</a></td> </tr> <?php //------------??????????? Connection ?????????????? MySQL ---------------- $hostname = "localhost"; $username = "root"; $password = "datacom"; $db="tempe"; $td= "temp"; $conn = mysql_connect( $hostname, $username, $password ); if ( ! $conn ) die ( "?????????????????? MySQL ???" ); //mysql_query("SET NAMES utf8",$conn); //----------?? ??????????? Connection ?????????????? MySQL --------------- //----------????????????????????? school -------------------------------------- mysql_select_db ( $db,$conn) or die ( "??????????????????????? inventory ???" ); //----------??????????????????????? school ----------------------------------- $sql="select * from temp order by ".$sort ; $re=mysql_query($sql); $k=1; while ($row=mysql_fetch_array($re)){ ?> <tr align="center" > <td width="5%" align="left" nowrap="nowrap" bgcolor="#CCCCCC"><? echo $row["id"]?></td> <td width="10%" align="left" nowrap="nowrap" bgcolor="#CCCCCC"><? echo $row["cab"]?></td> <td width="10%" align="left" nowrap="nowrap" bgcolor="#CCCCCC"><? echo $row["ip"]?></td> <td width="10%" align="left" nowrap="nowrap" bgcolor="#CCCCCC"><? echo substr ($row["temp"],-9)."<br>";?></td> <td width="8%" align="left" nowrap="nowrap" bgcolor="#CCCCCC"><?php echo $row["day"]."/"; echo $row["mont"]."/" ;echo $row["year"];?></td> <td width="8%" align="left" nowrap="nowrap" bgcolor="#CCCCCC"><a href="edit_ipvlan.php?id=<?php echo $row["id"] ?>"><img src="edit.jpg" width="30" height="30" /></a></td> <td width="8%" align="left" nowrap="nowrap" bgcolor="#CCCCCC"><a href="delete_ipvlan.php?id=<?php echo $row["id"] ?>"><img src="delete.jpg" width="30" height="30" /></a></td> </tr> <? } ?> </table>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง