<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>jQuery UI 測試</title> <script src="jquery.min.js"></script> <script src="jquery-ui.min.js"></script> <link id="theme" href="themes/hot-sneaks/jquery-ui.min.css" rel="stylesheet"> <style> body {font: 62.5% "Trebuchet MS", sans-serif; margin: 50px;} </style> </head> <body> 股名 : <input id="auto1" type="text" /> 股號 : <input id="auto2" type="text" /> <script language="JavaScript"> $(document).ready(function(){ var url_1="./get_stocks_name.php"; var url_2="./get_stocks_id.php"; $("#auto1").autocomplete({source: url_1}); $("#auto2").autocomplete({source: url_2}); }); </script> </body> </html>