The search input type is used lớn designate the input đầu vào as being used for search.
Bạn đang xem: How to use search input type in html input type=search, html input type=search attribute
Support is a bit arbitrary here as the spec doesn’t require any special treatment for search fields. Apk doesn’t vì anything special though, where all other browsers do.Safari, Opera và Chrome (on OS X) round the corners of tìm kiếm inputs. These same browsers on Windows do not round the corners of the inputs. Presumably the OS X rounding is to lớn match the look of tìm kiếm inputs in the operating system (Finder windows). Firefox & IE vì chưng not round corners.When a value is present, a gray x control shows up on the right of the input in IE, Chrome, Safari và Opera (but not Firefox or Chrome on Android) which can be clicked lớn clear the value. IE includes this x in non-search controls as well.WebKit’s special styling prevents some CSS attributes from functioning as expected: padding, fonts stuff (only three allowable font-sizes), border, background… You can remove special styling and limitations and return the look back khổng lồ a regular text đầu vào with:-webkit-appearance: none;In Chrome 17 (or possibly before, but not as early as 13), you get a dropdown thực đơn of past searches when the field comes into focus.