ASP新闻栏目切换+JS

ASP新闻栏目切换+JS,第1张

概述<%dim rsdim sqldim countset rs=server.createobject("adodb.recordset")sql = "select * from kml_sclass"rs.open sql,conn,1,1%><script language = "JavaScript">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%>;function changelocation(locationid)    {    document.myform.sclassid.length = 0;    var locationid=locationid;    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]);            }               }           }   </script></head><body><br><form name="myform" method="post" action="?action=addsave"><table width="80%"  border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">  <tr bgcolor="#F6F6F6">    <td height="25" colspan="2"><div align="center"><strong>修改新闻</strong></div></td>  </tr><tr bgcolor="#F6F6F6"><td align="center" height="25">新闻样式:</td><td><input name="jibie" type="radio" value="0" checked>          中文版</td></tr>  <tr>    <td width="15%" height="25" align="right" bgcolor="#F6F6F6">文章类型:</td>    <td width="85%" bgcolor="#FFFFFF"><%    sql = "select * from kml_bclass"    rs.open sql,conn,1,1 if rs.eof and rs.bof then response.write "请先添加栏目。" response.end else%><select name="bclassid" location(document.myform.bclassid.options[document.myform.bclassid.selectedIndex].value)" size="1">        <option selected value="<%=trim(rs("bclassid"))%>"><%=trim(rs("bclassname"))%></option>        <%dim selclass         selclass=rs("bclassid")        rs.movenext        do while not rs.eof%><option value="<%=trim(rs("bclassid"))%>"><%=trim(rs("bclassname"))%></option><%rs.movenextloopend ifrs.close%>      </select>      <select name="sclassid"><%sql="select * from kml_sclass where bclassid="&selclassrs.open sql,conn,1,1if not(rs.eof and rs.bof) then%>        <option selected value="<%=rs("sclassID")%>"><%=rs("sclassname")%></option><%rs.movenextdo while not rs.eof%><option <%if RsEdit("sclassid")=rs("sclassID") then %> selected <% end if %>value="<%=rs("sclassID")%>"><%=rs("sclassname")%></option><%rs.movenextloopend if        rs.close        set rs = nothing%></select>

<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from kml_sclass"
rs.open sql,conn,1,1
%>





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

     

总结

以上是内存溢出为你收集整理的ASP新闻栏目切换+JS全部内容,希望文章能够帮你解决ASP新闻栏目切换+JS所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1220184.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-05
下一篇 2022-06-05

发表评论

登录后才能评论

评论列表(0条)