我有一個文本框,它被 jquery“觀察”到幾個動作,所有代碼都是“搜索時輸入”表單的一部分。好吧,在 Mozilla 上一切正常,但在 Chrome 中,文本框在第一次點擊后失去焦點,所以我必須再次單擊文本框以繼續搜索。任何線索?我的經驗導致我遇到錯誤<div class="search-container"> <input type="text" placeholder="Search.." name="searchb" ></div><script> $('input[name="searchb"]').on('input propertychange paste',function(){if ($(this).val().length > 2){ document.cookie = "psearch="+this.value+";"+"path=/"; window.open("main.php?psearch="+this.value, "iframe_a"); } });</script>
<input type="text" 在 chrome 中第一次按鍵后失去焦點
幕布斯6054654
2021-06-08 17:23:06