二级联动菜单
Jun 08, 2016 pm 05:30 PM 二级联动下拉菜单 自家用的 js二级联动菜单 其实我觉得 asp二级联动菜单 与 php二级联动菜单 两个相同只是表示方式不一样.
<script></script>
function GetObjId(ObjName)
{
//alert(document.all.tags('select')[i].name);
for(i = 0; i
{
if (document.all.tags('select')[i].name == ObjName) {return(i); break;}
}
return(-1);
}
function Do_ToDo_Change(ObjName1, ObjName2, StatInt)
{
//document.forms[0].elements[0].name
var id1, id2, tempstr, tempint
var my_array = new Array();
$list='';
for($i=1;$i
$osql ="Select * from tanbme where f_id=$i";
$resul =mysql_query($osql) or die(mysql_error());
while($res =mysql_fetch_array($resul)){
$list=$list.$res['id'].'|'.$res['z_name'].',';
}
?>
my_array[] = '';
$list='';
}
?>
id1 = GetObjId(ObjName1);
id2 = GetObjId(ObjName2);
tempint = document.all.tags('select')[id2].length;
for(i = 1; i
if (document.all.tags('select')[id1].selectedIndex > StatInt - 1)
{
tempstr = my_array[document.all.tags('select')[id1].selectedIndex - 1].split(",");
for(i = 1; i
}
}
原创文章:转载请注明www.111cn.net

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Solution: Your organization requires you to change your PIN

How to adjust window border settings on Windows 11: Change color and size

How to change title bar color on Windows 11?

OOBELANGUAGE Error Problems in Windows 11/10 Repair

How to enable or disable taskbar thumbnail previews on Windows 11

10 Ways to Adjust Brightness on Windows 11

How to turn off private browsing authentication for iPhone in Safari?
