CSS+JS Implement select list horizontal arrangement effect Code _ form effects

Source: Internet
Author: User
<ptml> <pead> <meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "> <title> Please select Abcdefghi_select Horizontal effect _ Cloud Habitat </title> </pead> <body> <style > *{font-size:12px;} a.s_l {BORDER: #dddddd 1px solid; Border-right: #dddddd 0px solid; BACKGROUND: #ffffff; padding:4px 6px 2px 6px; TEXT-DECORATION:NONE;LINE-HEIGHT:12PX} a.s_l:hover {BORDER: #003366 1px solid; Border-right: #dddddd 0px solid; BACKGROUND: #0063dc; COLOR: #ffffff; TEXT-DECORATION:NONE;LINE-HEIGHT:12PX} a.s_r {BORDER: #dddddd 1px solid; BACKGROUND: #ffffff; padding:4px 6px 2px 6px; TEXT-DECORATION:NONE;LINE-HEIGHT:12PX} a.s_r:hover {BORDER: #003366 1px solid; BACKGROUND: #0063dc; COLOR: #ffffff; TEXT-DECORATION:NONE;LINE-HEIGHT:12PX} input {BORDER: #aaa 1px solid;width:65px;height:23px; padding:4px 6px 0px 6px;background:url (http://bbs.blueidea.com/attachment.php?aid=90338&noupdate=yes) No-repeat Center; . span1 {Position:relative;top:3px;} . span2 {position:relative;left:-3px;top:1px} </style> <span class= "span1" ><input type= "text" value= "please Select "Onclick=" Sele (this) ></span> <span class= "span2" id= "select" >ABCDEFGHI</span> <script > Function Sele (o) {var Oobj=document.getelementbyid ("select") if (oobj.style.display== "None") {OOB J.style.display= "" Var obj=oobj.getelementsbytagname ("a"), J=obj.length for (Var i=0;i<j;i++) { Obj[i].onclick=function () {o.value=this.innerhtml; Oobj.style.display= ' None '}} else oobj.style.display= ' None '} </script> </b Ody> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Related Article

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.