注意点
<form action=""> <input placeholder="搜索想要的内容" type="search"> </form>
默认样式清除 清除 X 图标
input[type="search"]::-webkit-search-cancel-button{ display: none; -webkit-appearance: none; }
//搜索事件触发 触发 onsubmit 事件就好 在input标签上绑定 js jq 都可以
注意点
<form action=""> <input placeholder="搜索想要的内容" type="search"> </form>
默认样式清除 清除 X 图标
input[type="search"]::-webkit-search-cancel-button{ display: none; -webkit-appearance: none; }
//搜索事件触发 触发 onsubmit 事件就好 在input标签上绑定 js jq 都可以
转载于:https://www.cnblogs.com/jiangYixiao/p/9945467.html