我要包括我的html代碼below.Code滾動條是這樣 - >HTML:有沒有一種方法,以包括HTML代碼滾動
<html>
<head></head>
<body>
<div style="overflow:scroll;height:100px;scrollbar-shadow-color: #2D2C4D;scrollbar-highlight-color:#7D7E94;scrollbar-face-color: #000000;scrollbar-3dlight-color:#7D7E94;">
<table width="100%" style="border-collapse:collapse;overflow:scroll;height:10px">
<tr>
<% dim CountFlg
CountFlg = 0
for i=0 to XmlNodes.length-1
if CountFlg <= 2 then %>
<td>
<b><%=XmlNodes.item(i).getAttribute("xx")%></b>
</td>
<TD>
<input class="TextArea" name="<% xx % >" id="<% xx %>" style="height:35px;overflow:auto;padding-left:80px;" rows="5"cols="10"> </input>
</TD>
<% CountFlg=CountFlg+1
end if
next%>
</tr>
</table>
</div>
</body>
</html>
因爲我有一個for循環在這裏我不知道有多少標籤,我會get.So我想過把滾動條我tag.How做到這一點的?有沒有一種方法,我可以把如果conition這裏div標籤,就像如果XmlNodes.length> 8則包括格標籤其他不需要div標籤。如何做到這一點。?
:謝謝你的回答。它的工作。但右側滾動條是不可見的。如何做到這一點? – user1495475
:我要在這裏做的另一件事,我必須包括DIV只有「XmlNodes.length」> 8.How做到這一點PLZ suggext一個答案? – user1495475
它對我來說工作正常,你可以在http://jsfiddle.net上做你的問題的測試用例嗎?所以我可以重現你的問題。 – Nelson