出来るのだASP Q&A掲示板(過去LOG)
訪問数 52046
昨日 889
今日 776 【PR】 パソコン入門からIT専門書まで幅広く取り揃えています。セブン-イレブン受取り手数料無料のセブンアンドワイ。 |
![]() ![]() ![]() ![]() ![]() |
[4614] Re:ASPでの掲示板作成について |
投稿者:Lightningさん 2004/08/27 12:02:52 |
で、javascript版 index1.asp <% dim no(100),RootNo(100),Title(100),aDate(100),name(100) OpenNo = Request.QueryString("no") set objFSO = Server.CreateObject("Scripting.FileSystemObject") mappath = Server.Mappath("./data1.txt") set objTS = objFSO.OpenTextFile(mappath) i = 0 Do until objTS.AtEndOfStream tmp = split(objTS.ReadLine,",") RootNo(i) = tmp(0) no(i) = tmp(1) Title(i) = tmp(2) aDate(i) = tmp(3) name(i) = tmp(4) i = i +1 loop objTS.close set objTS = nothing set objFSO = nothing EndCount = i - 1 %> <html lang="ja"> <head> <title></title> <script type="text/javascript"><!-- function OpenClose(ID){ if(document.getElementById(ID).style.display=="none"){ document.getElementById(ID).style.display="block" }else{ document.getElementById(ID).style.display="none" } } //--></script> <style> div.menu{align:left} </style> </head> <body> <% for i = 1 to EndCount %> <% if no(i) = 0 and RootNo(i) <> 0 then %> </div> <% end if %> <div onclick="OpenClose('<%=Rootno(i)%>');"><%=Title(i)%>:<%=name(i)%>:<%=aDate(i)%></div> <% if no(i) = 0 then %> <div class="menu" align="left" id="<%=RootNo(i)%>" style="display:none"> <% end if %> <% next %> </body> </html> data1.txt ROOTNO,NO,Title,Date,Name 0,0,○○のお知らせ,2004/08/01,テスト タロウ 0,1,○△の通知,2004/07/30,テスト ジロウ 0,2,○◇ニュース,2004/07/27,テスト タロウ 1,0,○○のお知らせ,2004/08/01,テスト タロウ 1,1,○◇ニュース,2004/07/27,テスト タロウ 1,2,○△の通知,2004/07/30,テスト ジロウ まだ、階層表示があまいですが・・・ |
![]() ![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
TreeBBS For ASP V.0.1.3 |