<p class="listintro"><span id="sp"></span>js</p> <p style="width:340px;height:285px;float:left;"> <script language="JavaScript"><br/>function show_board(board_top,board){<br/> var select_index,select_id,select_name,i,j;<br/> select_index=board_top.selectedIndex;<br/> select_id=board_top.options[select_index].value;<br/> form1.parent_id.value=select_id;<br/> form1.board_top_add.value=board_top_arr[select_id].name;<br/> form1.note_top_add.value=board_top_arr[select_id].note;<br/> form1.manager_top_add.value=board_top_arr[select_id].manager;<br/> for(i=board.length-1;i>=0;i--){<br/> board.remove(i);<br/> }<br/> for(i=0;i<board_arr[select_id].length;i++){<br/> if(typeof(board_arr[select_id][i])=="object"){<br/> var oOption = document.createElement("OPTION");<br/> oOption.text=board_arr[select_id][i].name;<br/> oOption.value=board_arr[select_id][i].id;<br/> //document.all.MyList.add(oOption);<br/> board.add(oOption);<br/> }<br/> }<br/> <br/>}<br/>function select_board(board){<br/> var select_index,select_id;<br/> select_index=board.selectedIndex;<br/> select_id=board.options[select_index].value;<br/> form1.board_id.value=select_id;<br/> form1.board_add.value=board_arr[form1.parent_id.value][select_id].name;<br/> form1.note_add.value=board_arr[form1.parent_id.value][select_id].note;<br/> form1.manager_add.value=board_arr[form1.parent_id.value][select_id].manager;<br/>}<br/>function W(text){<br/> document.write(text);<br/>}<br/>function board_func(id,name,note,manager){<br/> this.id=id;<br/> this.name=name;<br/> this.note=note;<br/> this.manager=manager;<br/>}<br/>var board_arr=new Array();<br/>var board_top_arr=new Array();<br/><?php<br/>$board_top_option="";<br/>$query="select board_id,board_name,board_note,board_manager from board where board_level='1' order by board_id";<br/>$result_top=mysql_db_query($dbname,$query);<br/>while($myrow_top=mysql_fetch_array($result_top)){<br/> $board_top_option.="<option value='$myrow_top[board_id]'>$myrow_top[board_name]\n";<br/> echo "board_top_arr[$myrow_top][board_id]]=new board_func('$myrow_top[board_id]','$myrow_top[board_name]','$myrow_top[board_note]','$myrow_top[board_manager]');\n";<br/> $query="select board_id,board_name,board_note,board_manager from board where board_level='2' and parent_id='$myrow_top[board_id]' order by board_id";<br/> $result=mysql_db_query($dbname,$query);<br/> echo "var tmp_arr=new Array();\n";<br/> while($myrow=mysql_fetch_array($result)){<br/> echo "tmp_arr[$myrow][board_id]]=new board_func('$myrow[board_id]','$myrow[board_name]','$myrow[board_note]','$myrow[board_manager]');\n";<br/> }<br/> echo "board_arr[$myrow_top][board_id]]=tmp_arr;\n";<br/>}<br/>?><br/><br/>function checkform(text){<br/> if(text.value.length==0){<br/> alert("请输入要添加的版面名称!");<br/> return false;<br/> }<br/> return true;<br/>}<br/></script> </p> <center> </center> <p style="width:100%;text-align:center;margin:10px 0"> <br> <br> </p> <p style="width:100%;text-align:center;margin:10px 0"> </p> <p class="clear"></p>