<html> <head><title>Javascript Dynamic ListBox Demonstration</title> </head> <body bgcolor="#ffffff" OnLoad="setOption(document.ThisForm, 0)"> <h2>Javascript Dynamic ListBox Demonstration</h2> <hr> <blockquote> <form name="ThisForm"> <select name="List1" OnChange="setOption(this.form, this.selectedIndex)"> <option>Animals <option>Colours <option>Numbers <option>Places </select><p> <select name="List2" OnChange="this.form.ValueIn2.value=this.options[this.selectedIndex].value"> <option> <option> <option> <option> <option> <option> <option>_________________ </select> Value in second listbox: <input name="ValueIn2" size="5"> </form> <script language="javascript"> <!-- function setOption(form, index) { for (var i = 0; i < form.List2.length; i++) { form.List2.options[i].text = ""; form.List2.options[i].value = ""; } if (index == 0) { form.List2.options[0].text = "Cat"; form.List2.options[0].value = "ani0"; form.List2.options[1].text = "Lion"; form.List2.options[1].value = "ani1"; form.List2.options[2].text = "Tiger"; form.List2.options[2].value = "ani2"; form.List2.options[3].text = "Dog"; form.List2.options[3].value = "ani3"; form.List2.options[4].text = "Cow"; form.List2.options[4].value = "ani4"; form.List2.options[5].text = "Snake"; form.List2.options[5].value = "ani5"; form.List2.options[6].text = "Monkey"; form.List2.options[6].value = "ani6"; } else if (index == 1) { form.List2.options[0].text = "Blue"; form.List2.options[0].value = "col0"; form.List2.options[1].text = "Red"; form.List2.options[1].value = "col1"; form.List2.options[2].text = "Yellow"; form.List2.options[2].value = "col2"; form.List2.options[3].text = "Green"; form.List2.options[3].value = "col3"; form.List2.options[4].text = "Orange"; form.List2.options[4].value = "col4"; } else if (index == 2) { form.List2.options[0].text = "One"; form.List2.options[0].value = "num0"; form.List2.options[1].text = "Two"; form.List2.options[1].value = "num1"; form.List2.options[2].text = "Three"; form.List2.options[2].value = "num2"; form.List2.options[3].text = "Four"; form.List2.options[3].value = "num3"; form.List2.options[4].text = "Five"; form.List2.options[4].value = "num4"; } else if (index == 3) { form.List2.options[0].text = "Airport"; form.List2.options[0].value = "pla0"; form.List2.options[1].text = "Railway Station"; form.List2.options[1].value = "pla1"; form.List2.options[2].text = "Museum"; form.List2.options[2].value = "pla2"; form.List2.options[3].text = "Stadium"; form.List2.options[3].value = "pla3"; } form.List2.selectedIndex = 0; form.ValueIn2.value = form.List2.options[form.List2.selectedIndex].value; } //--> </script> <p> <a xhref="dynalistbox.txt">Source</a> </blockquote> <hr> <a xhref="/javascript">More Examples</a> <p> <center> <!-- SiteSearch Google --> <form method="get" action="http://www.google.com/custom" target="_top"> <table border="0" bgcolor="#cccccc"> <tr><td nowrap="nowrap" valign="top" align="left" height="32"> <a xhref="http://www.google.com/"> <img xsrc="http://www.google.com/logos/Logo_25gry.gif" border="0" alt="Google" align="middle"></img></a> </td> <td nowrap="nowrap"> <input type="hidden" name="domains" value="www.tneoh.zoneit.com"></input> <label for="sbi" style="display: none">Enter your search terms</label> <input type="text" name="q" size="31" maxlength="255" value="javascript dynamic dropdown list" id="sbi"></input> <label for="sbb" style="display: none">Submit search form</label> <input type="submit" name="sa" value="Search" id="sbb"></input> </td></tr> <tr> <td> </td> <td nowrap="nowrap"> <table> <tr> <td> <input type="radio" name="sitesearch" value="" checked id="ss0"></input> <label for="ss0" title="Search the Web"><font size="-1" color="#000000">Web</font></label></td> <td> <input type="radio" name="sitesearch" value="www.tneoh.zoneit.com" id="ss1"></input> <label for="ss1" title="Search www.tneoh.zoneit.com"><font size="-1" color="#000000">www.tneoh.zoneit.com</font></label></td> </tr> </table> <input type="hidden" name="client" value="pub-8107226585316883"></input> <input type="hidden" name="forid" value="1"></input> <input type="hidden" name="ie" value="ISO-8859-1"></input> <input type="hidden" name="oe" value="ISO-8859-1"></input> <input type="hidden" name="safe" value="active"></input> <input type="hidden" name="cof" value="GALT:#0066CC;GL:1;DIV:#999999;VLC:336633;AH:center;BGC:FFFFFF;LBGC:FF9900;ALC:0066CC;LC:0066CC;T:000000;GFNT:666666;GIMP:666666;FORID:1"></input> <input type="hidden" name="hl" value="en"></input> </td></tr></table> </form> </center> </body> </html> ประมานนี้มั้งครับ ที่อยากได้
<?php $sql=mysql_query("select * from table_name where field_name like '$search' "); //or '%$search%' เลือกใช้ตามจุดประสงค์เลยครับ $res=mysql_fetch_assoc($sql)) ?> <input type="text" name='search' value='$search'><br> <input type="text" name='user' value='<?=$res[user]?>' ><br> <input type="text" name='password' value='<?=$res[password]?>' ><br> <input ype="text" name='PRI' value='<?=$res[pri]?>' ><br> ....
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง