日期:2014-05-18 浏览次数:20456 次
------------------------------------------ -- parent ------------------------------------------ drop table kout_phone; create table kout_phone ( id int, phone_value int, phone_text varchar2(50) ) / insert into kout_phone values (1, 100, 'MOTO'); insert into kout_phone values (2, 101, 'Nokia'); commit; select * from kout_phone; /* Result: ID PHONE_VALUE PHONE_TEXT ---------- ----------- -------------------------------------------------- 1 100 MOTO 2 101 Nokia */ ------------------------------------------ -- child ------------------------------------------ create table kout_phone_type ( id int, parent_id int, type_value int, type_text varchar2(50) ) / insert into kout_phone_type values (1, 100, 10001, 'MOTOAAA'); insert into kout_phone_type values (2, 100, 10002, 'MOTOBBB'); insert into kout_phone_type values (3, 100, 10003, 'MOTOCCC'); insert into kout_phone_type values (4, 101, 10101, 'NOKIAAAA'); insert into kout_phone_type values (5, 101, 10102, 'NOKIABBB'); insert into kout_phone_type values (6, 101, 10103, 'NOKIACCC'); insert into kout_phone_type values (7, 101, 10104, 'NOKIADDD'); insert into kout_phone_type values (8, 101, 10105, 'NOKIAEEE'); commit; select * from kout_phone_type; /* Result: ID PARENT_ID TYPE_VALUE TYPE_TEXT ---------- ---------- ---------- -------------------------------------------------- 1 100 10001 MOTOAAA 2 100 10002 MOTOBBB 3 100 10003 MOTOCCC 4 101 10101 NOKIAAAA 5 101 10102 NOKIABBB 6 101 10103 NOKIACCC 7 101 10104 NOKIADDD 8 101 10105 NOKIAEEE */
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DDL2JiLianDong.aspx.cs" Inherits="DDL2JiLianDong" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>DDL 2 Ji Lian Dong</title> <script language="javascript"> //jb函数会根据不同的浏览器初始化个xmlhttp对象 function jb() { var A=null; try { A=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { A=new ActiveXObject("Microsoft.XMLHTTP"); } catch(oc) { A=null } } if ( !A && typeof XMLHttpRequest != "undefined" ) { A=new XMLHttpRequest() } return A } //下面Go函数是父列表框改变的时候调用,参数是选择的条目 function Go(obj) { //得到选择框的下拉列表的value var svalue = obj.value; //定义要处理数据的页面 var weburl = "DDL2JiLianDong.aspx?parent_id="+svalue; //初始化个xmlhttp对象 var xmlhttp = jb(); //提交数据,第一个参数最好为get,第三个参数最好为true xmlhttp.open("get"