Use HTC to implement a list prompt box

xiaoxiao2021-04-07  341

relaxlife.net collection: with HTC to achieve prompt list box [Date: 2005-05-16] [From:] [Author: cexo255] with HTC to achieve prompt list box [Date: 2004-12-11] Source: 9cbs Author : [Font: Large Size] Demo Definition TIPSRC Data Source (XML File) Tiplen List Box Length (Digital) InputCase Size ("Upper" or "Lower") Example HTC files // data source, XML file // list box length // Size var list = new array (); // data list var ONPUT; / / target object var telect; // list box object var odiv; // position object / *** initialization *** / Function init (); //alert (Element.name); element; oinput = element; oinput = element; odiv = document.createElement ("div"); var top = ele.offSettop; var left = ele.offsetleft Var width = ele.offsetwidth;

Var height; while (ele = ele.offsetparent) {top = ele.offsettop; left = ele.offsetleft;} TOP = TOP Height; odiv.style.position = "absolute"; // alert (Left "=" TOP); ODIV.Style.Left = left; odiv.style.top = top; odiv.style.visibility = "hidden"; // alert (left); // alert (TOP); OSELECT = Document.createElement ("SELECT"); if (tipsrc! = null && tipsrc! = ") {osent.size = tiplen;} else {osent.size = 10;}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} }Electr.value = this.value;} oSelect.attachEvent ( "onkeydown", changeTip); oSelect.attachEvent ( "onclick", selectTip); oInput.insertAdjacentElement ( "afterEnd", oDiv); oDiv.insertAdjacentElement ( "afterBegin", oSelect); return True;} / *** loading data *** / function loadData () {if (tipsrc! = null && tipsrc! = ") {var xmldom = new activXObject ('microsoft.xmldom'); xmldom.async = false; / / Alert (TIPSRC); XmLDom.Load (TIPSRC); root = xmldom.documentelement; temp = root.selectnodes ("// Option"); for (var i = 0; i

List.Length; i ) {if (list.indexof (input) == 0) {OSELECT.ADD (New Option (List, List));}} / * for (VAR i = 0; i = 0; I - {osent.Options.remove (i)}}

转载请注明原文地址:https://www.9cbs.com/read-132485.html

New Post(0)