我在使用AJAX提交表单时遇到问题。我在顶部有一个搜索栏,没有提交按钮。我的计划是当用户在iphone键盘上点击“开始”或“搜索”时提交表单。任何人有任何想法?在iphone上提交没有提交按钮的键盘关闭ajax表单?
编辑:我有阿贾克斯工作,但我似乎无法让键盘关闭后,我按搜索。
下面是代码:
<form id="searchForm" method="post" onsubmit="event.preventDefault(); showSearch(search.value);">
<input type="text" name="search" id="searchField">
</form>
谢谢!我知道了。谁知道它可能非常简单。我刚刚添加search.blur();到提交。