Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带按钮的文本框。如何使用 onclick 函数从 JS 文件中的 Web SQL 数据库中检索值并显示在文本框中?
您可以Ajax为此使用:
Ajax
XmlHttp.onreadystatechange = HandleUserNameResult; XmlHttp.open("GET", requestUrl, true); XmlHttp.send(null); function HandleUserNameResult() { var responseText = XmlHttp.responseText; //Here you will get the result; }