<!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> <script type="text/javascript" src="../autocomplete.js"></script> <link rel="stylesheet" href="../autocomplete.css" type="text/css"/> <script type="text/javascript"> function make_autocom(autoObj,showObj){ var mkAutoObj=autoObj; var mkSerValObj=showObj; new Autocomplete(mkAutoObj, function() { this.setValue = function(id) { document.getElementById(mkSerValObj).value = id; } if ( this.isModified ) this.setValue(""); if ( this.value.length < 1 && this.isNotClick ) return ; return "gdata.php?q=" +encodeURIComponent(this.value); }); } // การใช้งาน // make_autocom(" id ของ input ตัวที่ต้องการกำหนด "," id ของ input ตัวที่ต้องการรับค่า"); make_autocom("show_arti_topic","h_arti_id"); </script> </head> <div style="left: 347px; top: 1024px; width: 400px;" class="autosuggest" id="as_testinput_xml"> <div class="as_header"> <div class="as_corner"></div> <div class="as_bar"></div> </div> <ul id="as_ul"> <li> <a name="1" href="#"> <span class="tl"> </span> <span class="tr"> </span> <span><em>W</em>aldron, Ashley<br><small>Leicestershire</small></span> </a> </li> <li> <a name="2" href="#"> <span class="tl"> </span> <span class="tr"> </span> <span><em>W</em>heeler, Bysshe<br><small>Lincolnshire</small></span> </a> </li> </ul> <div class="as_footer"> <div class="as_corner"></div> <div class="as_bar"></div> </div> </div> </html>