ASP新闻栏目切换+JS

前端之家收集整理的这篇文章主要介绍了ASP新闻栏目切换+JS前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from kml_sclass"
rs.open sql,conn,1,1
%>
var onecount;
onecount=0;
subcat = new Array();
        <%
        count = 0
        do while not rs.eof
        %>
subcat[<%=count%>] = new Array("<%= trim(rs("sclassname"))%>","<%= trim(rs("bclassid"))%>","<%= trim(rs("sclassid"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>
onecount=<%=count%>;

    {
    document.myform.sclassid.length = 0;

    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            {
              document.myform.sclassid.options[document.myform.sclassid.length] = new Option(subcat[i][0],subcat[i][2]);
            }       
        }
       
    }   





     
修 改 新 闻 
          中文版     
文章类型:    <%
    sql = "select * from kml_bclass"
    rs.open sql,1
 if rs.eof and rs.bof then
 response.write "请先添加栏目。"
 response.end
 else
%>

     

猜你在找的Asp相关文章