Title: 06-Type Ahead 添加一个判断内容是否为空的if · Issue #63 · soyaine/JavaScript30 · GitHub
Open Graph Title: 06-Type Ahead 添加一个判断内容是否为空的if · Issue #63 · soyaine/JavaScript30
X Title: 06-Type Ahead 添加一个判断内容是否为空的if · Issue #63 · soyaine/JavaScript30
Description: 问题 当清空输入框时 search 的 value 为空,此时所有诗句全部符合匹配规则,导致它们全部显示在页面中。 解决 在 displayMatches 函数开头添加一个判断,如果输入框为空不做处理: if (!this.value) { return } 位置 JavaScript30/06 - Type Ahead/index-SOYAINE.html Line 38 in 1b044bc function displayMatches() {
Open Graph Description: 问题 当清空输入框时 search 的 value 为空,此时所有诗句全部符合匹配规则,导致它们全部显示在页面中。 解决 在 displayMatches 函数开头添加一个判断,如果输入框为空不做处理: if (!this.value) { return } 位置 JavaScript30/06 - Type Ahead/index-SOYAINE.html Line 38 in 1b044...
X Description: 问题 当清空输入框时 search 的 value 为空,此时所有诗句全部符合匹配规则,导致它们全部显示在页面中。 解决 在 displayMatches 函数开头添加一个判断,如果输入框为空不做处理: if (!this.value) { return } 位置 JavaScript30/06 - Type Ahead/index-SOYAINE.html Line 38 in 1b044...
Opengraph URL: https://github.com/soyaine/JavaScript30/issues/63
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"06-Type Ahead 添加一个判断内容是否为空的if","articleBody":"# 问题\r\n当清空输入框时 `search` 的 `value` 为空,此时所有诗句全部符合匹配规则,导致它们全部显示在页面中。\r\n\r\n# 解决\r\n在 `displayMatches` 函数开头添加一个判断,如果输入框为空不做处理:\r\n```js\r\nif (!this.value) {\r\n return\r\n}\r\n```\r\n\r\n\r\n\u003e 位置\r\nhttps://github.com/soyaine/JavaScript30/blob/1b044bc6610cbb131d897d9a3cc814372a414018/06%20-%20Type%20Ahead/index-SOYAINE.html#L38\r\n\r\n","author":{"url":"https://github.com/GArosy","@type":"Person","name":"GArosy"},"datePublished":"2022-04-28T08:22:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/63/JavaScript30/issues/63"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d14d4c05-0941-d8d5-e519-a9edbc3bae7e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 88BE:1AD267:1091D9E:1747BBF:6972629D |
| html-safe-nonce | ae15b9e9c237a65d2bfb8bd55e268e48a4b65f2d6d3bf9c71a7f9d773e550f6e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OEJFOjFBRDI2NzoxMDkxRDlFOjE3NDdCQkY6Njk3MjYyOUQiLCJ2aXNpdG9yX2lkIjoiODI3Nzk4Mzk2Nzk0MDA3NjE4OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | de6743522d2dd6b9a5df5fae15f7cef5d78730810b650b5a8512b894393f0b8f |
| hovercard-subject-tag | issue:1218376210 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/soyaine/JavaScript30/63/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5d596b3d99637977b440b1a8ca1fa2876e963bc20efbf0b7b2e6b87efdb5310c/soyaine/JavaScript30/issues/63 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5d596b3d99637977b440b1a8ca1fa2876e963bc20efbf0b7b2e6b87efdb5310c/soyaine/JavaScript30/issues/63 |
| og:image:alt | 问题 当清空输入框时 search 的 value 为空,此时所有诗句全部符合匹配规则,导致它们全部显示在页面中。 解决 在 displayMatches 函数开头添加一个判断,如果输入框为空不做处理: if (!this.value) { return } 位置 JavaScript30/06 - Type Ahead/index-SOYAINE.html Line 38 in 1b044... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | GArosy |
| hostname | github.com |
| expected-hostname | github.com |
| None | ab2c8e6ec49d8737f6bf007a86b2c4a2bc434bba562c524e0c76465bc9ed358b |
| turbo-cache-control | no-preview |
| go-import | github.com/soyaine/JavaScript30 git https://github.com/soyaine/JavaScript30.git |
| octolytics-dimension-user_id | 12845017 |
| octolytics-dimension-user_login | soyaine |
| octolytics-dimension-repository_id | 76941939 |
| octolytics-dimension-repository_nwo | soyaine/JavaScript30 |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 76941939 |
| octolytics-dimension-repository_network_root_nwo | soyaine/JavaScript30 |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 52bb8e0c9f4e51b63385b80feac0e6ba25e8dbd5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width