|
|
|
เรื่อง list menu อ่ะจ้า สร้าง หลาย list menu จะทราบยังไงว่า เป็น ของตัวไหนอ่ะจ้า |
|
|
|
|
|
|
|
ผมว่าคสรใช้JUM MENU ดีกว่า
เช่น
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>Untitled Document</title>
</head>
<script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<?
$connect= mysql_pconnect("localhost","root","");
if (!$connect)
echo "äÁèÊÒÁÒöµÔ´µè͡Ѻà«ÍÃìàÇÍÃì";
$db=mysql_select_db("eportbase");
if (!$db)
echo "äÁèÊÒÁÒö µÔ´µè͡Ѻ°Ò¹¢éÍÁÙÅä´é";
?>
<?
$sql = "select * from ref_dept ";
$result = mysql_query($sql,$connect);
$sqlte= "select * from tb_person where dept_id = '$dept_id' ";
$rete= mysql_query($sqlte,$connect);
?>
<select name="dept_id" onchange="MM_jumpMenu('parent',this,0)">
<?
while ($X_emp= mysql_fetch_array( $result ))
{
?>
<option value="index.php?dept_id=<? echo htmlspecialchars($X_emp['dept_id'])?>"> <?
echo htmlspecialchars($X_emp['department']);
?></option>
<?
}
?>
</select>
<select name="teach_name">
<?
while ($X_tea= mysql_fetch_array($rete))
{
?>
<option value="<? echo htmlspecialchars($X_tea['dept_id'])?>"> <?
echo htmlspecialchars($X_tea['T_NAME']);
?></option>
<?
}
?>
</select>
<body>
</body>
</html>
|
|
|
|
|
Date :
2 ต.ค. 2549 14:32:08 |
By :
wongvian |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ขอบคุณมากๆ จ้า
|
|
|
|
|
Date :
2 ต.ค. 2549 21:23:16 |
By :
teewa2032 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|