Select list box prompt

Source: Internet
Author: User
<! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en"
Http://www.w3.org/TR/html4/loose.dtd>
<HTML>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<SCRIPT>
// Define popup
VaR op = Window. createpopup ();
Op.doc ument. Body. style. Background = "beige ";
// Whether popup is displayed
VaR opshow = 0;
VaR linecharcount = 20;
VaR linecount = new number (0 );
VaR subline = new string ();
Function showtitle (OBJ ){
VaR H = event. offsety;
VaR fontsize = (obj. style. fontsize = ""? (Obj. currentstyle. fontsize = ""? "9": obj. currentstyle. fontsize): obj. style. fontsize );
Fontsize = parseint (fontsize) * 1.6;
VaR L = parseint (H/fontsize );
If (null! = Obj. Options [l]) {
Linecount = 0;
Subline = obj. Options [l]. text;
 
Op.doc ument. Body. innertext = "";
Do {
If (subline. length> linecharcount ){
Op.doc ument. Body. innerhtml + = subline. substr (0, linecharcount) + "<br> ";
Subline = subline. substr (linecharcount, subline. Length-linecharcount );
Linecount + = 1;
}
} While (subline. length> linecharcount)
Op.doc ument. Body. innerhtml + = subline;
Linecount + = 1;
Len = linecharcount * 8;
Op. Show (event. offsetx + 20, event. offsety + fontsize + 5, Len, linecount * (fontsize + 2), document. Body );
Opshow = 1;
}
}
Function hidetitle (OBJ ){
If (opshow = 1) op. Hide ();
}
</SCRIPT>
<Title> untitled document </title>
</Head>
<Body>
<Form name = "form1" method = "Post" Action = "">
<Div id = div1 style = "overflow: auto; width: 100px;">
<Select name = S1 size = 7 style = "width: 120; Height: 60%" onmousemove = "showtitle (this);" onmouseout = "hidetitle (this);">
<Option> aaaaaaaaaaaaaaaaaaaaaa1
<Option> 012345678901234567899876543210987654321074102589637410258963963258741096328574107896321450789632145098741236509874123650
<Option> ccccccccccccccccccccccccpc3
<Option> ddddddddddddddddddddddddddddd1
<Option> eeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1
<Option> fffffffffffffffffffffffffff1
</SELECT>
</Div>
 
</Form>
</Body>
</Html>

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.