gpt4 book ai didi

javascript - 输入搜索在 Edge、IE 或 Firefox 中不起作用

转载 作者:行者123 更新时间:2023-11-30 09:15:38 25 4
gpt4 key购买 nike

搜索栏在 Chrome 和 Opera 中有效,但在上述浏览器中无效。我建议它与 onsearch="search(event)" 有关。

enter image description here

Mozilla 说它不受支持,我想知道是否有人知道这个问题的解决方案?

HTML:

<input
type=search
name=""
id="filterSearch"
placeholder="Search for events, seasonal meals or simply list ingredients"
onsearch="search(event)"
>

最佳答案

Internet Explorer、Firefox 或 Opera 12 及更早版本不支持 onsearch 事件。尝试使用 onchange、onkeyup 等

<input type=search name="" id="filterSearch" placeholder="Search for events, seasonal meals or simply list ingredients" onchange="search(this.id)">

关于javascript - 输入搜索在 Edge、IE 或 Firefox 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55279090/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com