Multi-level linkage drop-down selection box, dynamically obtain the next level, each level of data is xml, can support unlimited levels (the browser needs Microsoft.XMLDOM support)
Project needs, a material category table , Level 3, with a total of more than 7,000 records, which would be very slow if retrieved at one time, so dynamic reading was used to read one level at a time, and the server used caching, which was very efficient.
The HTML code is as follows:
<select name="MaterialClass1" ChildSelectName="MaterialClass2"></select> <select name="MaterialClass2" ChildSelectName="MaterialClass3"></select> <select name="MaterialClass3"></select> 'www.knowsky.com 其中ChildSelectName表示下一级Select的name
One of the xmls is as follows:
<MaterialClasses> <MaterialClass MaterialClassCode="01" Description="黑色及有色金属"/> <MaterialClass MaterialClassCode="02" Description="水泥、砂石砖瓦、砼"/> <MaterialClass MaterialClassCode="03" Description="木、竹材及其制品"/> </MaterialClasses>
The above is a multi-level linkage drop-down selection box, which dynamically obtains the content of the next level, more related Please pay attention to the PHP Chinese website (www.php.cn) for content!