We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当清空输入框时 search 的 value 为空,此时所有诗句全部符合匹配规则,导致它们全部显示在页面中。
search
value
在 displayMatches 函数开头添加一个判断,如果输入框为空不做处理:
displayMatches
if (!this.value) { return }
位置 JavaScript30/06 - Type Ahead/index-SOYAINE.html Line 38 in 1b044bc function displayMatches() {
位置
JavaScript30/06 - Type Ahead/index-SOYAINE.html
Line 38 in 1b044bc
The text was updated successfully, but these errors were encountered:
No branches or pull requests
问题
当清空输入框时
search
的value
为空,此时所有诗句全部符合匹配规则,导致它们全部显示在页面中。解决
在
displayMatches
函数开头添加一个判断,如果输入框为空不做处理:The text was updated successfully, but these errors were encountered: