开发者

Hide arrow in standard dropdown?

开发者 https://www.devze.com 2022-12-24 18:29 出处:网络
Is there a a way to hide the arrow in a standard dropdown select fieldset? Fiddle link I have an autocomplete system where you fill in the organisation number of a company and it finds the info bas开

Is there a a way to hide the arrow in a standard dropdown select fieldset?

Fiddle link

I have an autocomplete system where you fill in the organisation number of a company and it finds the info bas开发者_Go百科ed on a database. I'd like to have the select box, but without the arrow..

I need it to do this as it's a double function form, either you can fill in your ORG nr or just manually type it in, pretty simple, probably used all over the internet.

Thanks :)


Kyle, Usually autocomplete systems use input text elements instead of a select element. This creates what you are trying to achieve. Google is a classic example of this.

If you want, you can take a look at jQuery's autocomplete plugin to get another example and some code ideas, or whatever. http://docs.jquery.com/Plugins/Autocomplete


It's not easy, but you can fake it by putting a button above a Select that has its size property set to a value greater than 0.

Have the Select hidden and positioned absolutely under the button. Clicking the button shows the list. Selecting the list changes the text on the button and re-hides the Select.


This way you need a text box, because you cannot type anything in <select> tag. And put an onclick event to this box to open autocomplete with all possible values.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号