日期:2014-05-16 浏览次数:20379 次
<div id="index-splash-block" class="index-splash-block"> <div id="feature-slide-block" class="feature-slide-block"> <asp:Repeater ID="rep_prod1" runat="server" EnableTheming="true" EnableViewState="false"> <ItemTemplate> <div class="feature-slide-preview" style="display: none;"> <img src='uploads/Image/<%# DataBinder.Eval(Container, "DataItem.TitlePicUrl") %>' width="230" height="220" alt="" /> </div> </ItemTemplate> </asp:Repeater> <div id="feature-slide-list" class="feature-slide-list"> <a href="#" id="feature-slide-list-previous" class="feature-slide-list-previous"></a> <div id="feature-slide-list-items" class="feature-slide-list-items"> </div> <a href="#" id="feature-slide-list-next" class="feature-slide-list-next"></a> </div> </div> <script type="text/javascript"> initFeatureSlide(); </script>
function initFeatureSlide(strId) {
var domRoot = document.getElementById('feature-slide-block');
if (!domRoot) return;
domRoot.list = [];
var children = domRoot.childNodes;
var offset = 0;
for (var i in children) {
var domItem = children[i];
if (domItem && domItem.className == 'feature-slide-preview') {
domRoot.list.push(domItem);
domItem.offset = offset;
offset++;
}
}
var domList = document.getElementById('feature-slide-list-items');
if (!domList) return;
domList.innerHTML = '';
domList.items = [];
for (var i = 0; i < domRoot.list.length; i++) {
var temp = domRoot.list[i];
var domItem = document.createElement('a');
domList.appendChild(domItem);
domItem.href = '#';
domItem.onclick = function(){
return false;
}
domList.items.push(domItem);
domItem.offset = i;
}
&nb