一个漂亮的互动式下拉菜单!

发表于:2007-06-30来源:作者:点击数: 标签:
script language = Java Script var onecount; onecount=0; subcat = new Array(); subcat[0] = new Array(ASP基础教程,1,1); subcat[1] = new Array(ASP WEB 服务器 IIS,1,2); subcat[2] = new Array(ASP网页设计工具FPAGE,1,3); subcat[3] = new Array( 开
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
        
subcat[0] = new Array("ASP基础教程","1","1");
        
subcat[1] = new Array("ASP WEB服务器IIS","1","2");
        
subcat[2] = new Array("ASP网页设计工具FPAGE","1","3");
        
subcat[3] = new Array("开发工具VISUAL DEV","1","4");
        
subcat[4] = new Array("VBSCRIPT语言","1","5");
        
subcat[5] = new Array("ASPFAQ","2","6");
        
subcat[6] = new Array("ASP组件","2","7");
        
subcat[7] = new Array("ASP文摘","2","8");
        
subcat[8] = new Array("ASP实例","2","9");
        
subcat[9] = new Array("ASP安全","2","10");
        
subcat[10] = new Array("PHP教程","3","11");
        
subcat[11] = new Array("PHPFAQ","3","12");
        
subcat[12] = new Array("PHP文摘","3","13");
        
subcat[13] = new Array("PHP实例","3","14");
        
subcat[14] = new Array("PHP安全","3","15");
        
subcat[15] = new Array("PHP工具","3","16");
        
subcat[16] = new Array("数据库教程","5","17");
        
subcat[17] = new Array("数据库问题","5","18");
        
subcat[18] = new Array("数据库文摘","5","19");
        
subcat[19] = new Array("数据库安全","5","20");
        
subcat[20] = new Array("JSP教程","4","21");
        
subcat[21] = new Array("JSP文摘","4","22");
        
subcat[22] = new Array("JSP实例","4","23");
        
subcat[23] = new Array("JSP安全","4","24");
        
subcat[24] = new Array("JSP工具","4","25");
        
subcat[25] = new Array("JSPFAQ","4","26");
        
subcat[26] = new Array("精品子程序","2","27");
        
subcat[27] = new Array("ASP.NET","2","28");
        
onecount=28;

function changelocation(locationid)
    {
    document.myform.Nclassid.length = 0;

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            {
                document.myform.Nclassid.options[document.myform.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</script>
<form method="post" name="myform" action="ru_query.asp">
文章搜索:
<select name="action" size="1">
<option value="title">文章标题</option>
</select>
<select name="classid" onChange="changelocation(document.myform.classid.options[document.myform.classid.selectedIndex].value)" size="1">
    <option selected value="">未指定条件</option>
        
        <option value="1">ASP基础教程</option>
       
        
        <option value="2">ASP技术</option>
       
        
        <option value="3">PHP技术</option>
       
        
        <option value="4">JSP技术</option>
       
        
        <option value="5">数据库</option>
       
        
       </select>
    
    <select name="Nclassid">                   
        <option selected value="">未指定条件</option>
    </select>
<input type="text" name="keyword" class=smallinput size=10 value="关键字" maxlength="50">
<input type="submit" name="Submit" value="搜索">
</form>

原文转自:http://www.ltesting.net