Create a personalized select (editable)

Source: Internet
Author: User

Because the system's built-in SELECT statement is not easy to use, I wrote a brand new SELECT statement using JavaScript.

Function:
1. editable select
2. The length can be modified at will.
3. The system select can be overwritten.
4. forms supported
5. support CSS to modify the appearance
6. fixed the problem of running errors on IE 5.0.
7. Support Using JS scripts
Usage
[B] var materialized variable = new editselect (name, length, default string, width, height, read-only) [/B]
[B] materialized variable. Add (option value, JS script) [/B]

This is only a test version, and many functions are not complete. For example, value and caption are not differentiated. I hope you can provide valuable comments.

<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"> <br/> <style>. selecttext {border: 0px Height: 16; font-family: Arial; font-size: 12px ;}. selectbutton {font-family: webdings; font-size: 10px; Height: 19; width: 16; Border: 1px solid # 83a5eb; line-Height: 0px; padding-bottom: 3px; Background-color: # d1e0fd }. selecttable {font-family: Arial; font-size: 12px; cursor: default ;}. selectcontent {position: absolute; top: 0; left: 0; overflow: auto; Border: 1px solid #000000} </P> <p>. selectdiv {position: absolute; width: 100; overflow: hidden ;}. select {border-collapse: collapse; Border: 1px solid #7f9db9} </style> <Table border = "0" width = "100%"> <tr> <TD width = "151" align = "center"> editable select </TD> </tr> <TD width = "151" align = "center"> the length can be modified as needed <br/> can be set to read-only </TD> </tr> <TD width = "151" align = "center"> can overwrite system select </TD> </tr> <TD width = "151" align = "right"> </TD> <SELECT> <option> system select </option> </SELECT> <p> </TD> </tr> </table> <p>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.