运行 ❯
获取您
的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("input").keyup(function(){ txt = $("input").val(); $("span").load("demo_ajax_gethint.asp", {suggest: txt}); }); }); </script> </head> <body> <p>Start typing a name in the input field below:</p> First name: <input type="text"> <p>Suggestions: <span></span></p> <p>The file used in this example (<a href="demo_ajax_gethint.txt" target="_blank">demo_ajax_gethint</a>) is explained in our Ajax tutorial</p> </body> </html>