http://zhidao.baidu.com/question/122086235.html
这问题里也有答案,但看不懂啊,能提供详细的代码吗?
下面是我的代码:
<%
While ((Repeat1__numRows <> 0) AND (NOT shownews.EOF))
%>
<div name="CollapsiblePanel" class="CollapsiblePanel">
<div class="CollapsiblePanelTab" tabindex="0"><%=(shownews.Fields.Item("user_name").Value)%></div>
<div class="CollapsiblePanelContent"><%=(shownews.Fields.Item("news_content").Value)%></div>
</div>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
shownews.MoveNext()
Wend
%>
<script type="text/javascript">
var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1");
</script>
怎样让<div>里的ID自增
答案:1 悬赏:0 手机版
解决时间 2021-02-05 16:19
- 提问者网友:蓝琪梦莎
- 2021-02-05 04:54
最佳答案
- 五星知识达人网友:廢物販賣機
- 2021-02-05 05:55
<%
i=1
While ((Repeat1__numRows <> 0) AND (NOT shownews.EOF))
%>
<div id="CollapsiblePanel<%=i%>" class="CollapsiblePanel">
<div class="CollapsiblePanelTab" tabindex="0"><%=(shownews.Fields.Item("user_name").Value)%></div>
<div class="CollapsiblePanelContent"><%=(shownews.Fields.Item("news_content").Value)%></div>
</div>
<%
i=i+1
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
shownews.MoveNext()
Wend
%>
<script type="text/javascript">
var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1");
</script>
i=1
While ((Repeat1__numRows <> 0) AND (NOT shownews.EOF))
%>
<div id="CollapsiblePanel<%=i%>" class="CollapsiblePanel">
<div class="CollapsiblePanelTab" tabindex="0"><%=(shownews.Fields.Item("user_name").Value)%></div>
<div class="CollapsiblePanelContent"><%=(shownews.Fields.Item("news_content").Value)%></div>
</div>
<%
i=i+1
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
shownews.MoveNext()
Wend
%>
<script type="text/javascript">
var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1");
</script>
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯