Select drop-down box beautification

Source: Internet
Author: User

File Download:

Huawei Network Disk download: http://dl.dbank.com/c0pvz9djzx

<! -- Start from the drop-down list -->
<Link href = "<? PHP echo dt_path;?> File/select/reset.css "rel =" stylesheet "type =" text/CSS "/>
<Link href = "<? PHP echo dt_path;?> File/select/skins/style.css "rel =" stylesheet "type =" text/CSS "/>
<SCRIPT type = "text/JavaScript" src = "<? PHP echo dt_path;?> File/select/JS/select_split.js "> </SCRIPT>

<! -- The drop-down box ends -->

HTML code:

<select 
onchange="changeTag();" 
id="bus_big_classid" 
name="bus_big_classid"
childId="bus_small_classid" 
Childdatatype = "url" childdatapath = '<? PHP echo dt_path;?> Project/project_function.php? Act = pro_bus_small_items & id = '> <option value = "-1"> select industry-level 1 </option> <? PHP foreach ($ bigclasslist as $ arr1) {?> <Option value = '<? PHP echo $ arr1 ["Bid"];?> '> <? PHP echo $ arr1 ["bname"];?> </Option> <? PHP }?> </SELECT> <select name = "bus_small_classid" id = "bus_small_classid"> <option value = ""> Select secondary industry Category </option> </SELECT> <I ID = "bus_big_classid_msg" class = "reg-MSG"> </I>

PHP code:

$ Id = intval ($ id); $ xml_data = "<? XML version = '1. 0' encoding = 'utf-8'?> "; $ Xml_data. = "<root>"; if ($ id> 0) {$ selectsql = "select bus_small_classid, bus_small_name from ". $ cfg ['tb _ pre']. "bus_small where bus_big_classid = ". $ ID; $ resultsmall = $ db-> query ($ selectsql); While ($ ROW = $ db-> fetch_array ($ resultsmall) {$ xml_data. = "<node value = '". $ row ["bus_small_classid"]. "'text = '". $ row ["bus_small_name"]. "'/>" ;}} else {$ xml_data. = "<node value ='' text = 'select Level 2 industry classification'/> ";}$ xml_data. = "</root>"; echo $ xml_data;

The read URL cannot be obtained in IE. Only XML

<Select name = "ach_inn_big_classid" id = "ach_inn_big_classid" childid = "ach_inn_small_classid" childdatatype = "XML" childdatapath = '<? PHP echo dt_path;?> File/data/XML/ach_inn/'> <option value = "-1"> select </option> <? PHP foreach ($ ach_inn_big_lists as $ ARR) {?> <Option value = "<? PHP echo $ arr ['id'];?> "> <? PHP echo $ arr ["name"];?> </Option> <? PHP }?> </SELECT> <select name = "ach_inn_small_classid" id = "ach_inn_small_classid"> <option value = ""> select </option> </SELECT>

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.