1
<html>
2
<head>
3
<title>杰易CMS</title>
4
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
5
<script language="JavaScript">
6
<!--
7
var sectioncategories = new Array;
8
sectioncategories[0] = new Array( '-1','-1','請(qǐng)選擇' );
9
sectioncategories[1] = new Array( '1','1','A1' );
10
sectioncategories[2] = new Array( '2','2','B2' );
11
sectioncategories[3] = new Array( '3','3','C3' );
12
sectioncategories[4] = new Array( '3','4','C4' );
13
14
function changeDynaList( listname, source, key, orig_key, orig_val )
{
15
var list = eval( 'document.adminForm.' + listname );
16
// empty the list
17
for (i in list.options.length)
{
18
list.options[i] = null;
19
}
20
i = 0;
21
for (x in source)
{
22
if (source[x][0] == key)
{
23
opt = new Option();
24
opt.value = source[x][1];
25
opt.text = source[x][2];
26
27
if ((orig_key == key && orig_val == opt.value) || i == 0)
{
28
opt.selected = true;
29
}
30
list.options[i++] = opt;
31
}
32
}
33
list.length = i;
34
}
35
//-->
36
</script>
37
</head>
38
39
<body>
40
<br />
41
<form name="adminForm" action="index2.php" method="post">
42
43
<select name="sectionid" onchange="changeDynaList( 'catid', sectioncategories, document.adminForm.sectionid.options[document.adminForm.sectionid.selectedIndex].value, 0, 0);">
44
<option value="1" selected="selected">A</option>
45
<option value="2">B</option>
46
<option value="3">C</option>
47
</select>
48
<select name="catid">
49
<option value="-1">請(qǐng)選擇</option>
50
<option value="1" selected="selected">A1</option>
51
</select>
52
</form>
53
</body>
54
</html>

2

3

4

5



6

7

8

9

10

11

12

13

14



15

16

17



18

19

20

21



22



23

24

25

26

27



28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54
