目前,我對JavaScript的一個轉盤,當我們點擊超鏈接,這樣它的工作原理:的onMouseOver,超鏈接和rel ...幫助我:(
<div id="direction1">
<p>
<a href="javascript:" class="carousel-control" rel="next"><img class="fleche_suiv" src="/project/images/next.png" alt="Suivant" title="Suivant" />
</a>
</p>
</div>
我想用的onMouseOver執行此西奧。太 因此,我想這一點,但它不工作:
<div id="direction1">
<p onMouseOver="this.getElementsByTagName('a').click()">
<a href="javascript:" class="carousel-control" rel="next"><img class="fleche_suiv" src="/project/images/next.png" alt="Suivant" title="Suivant" />
</a>
</p>
</div>
如何修復它???
PS:
這是有問題的JS代碼:
next: function() {
if (this.current) {
var currentIndex = this.current._index;
var nextIndex = (this.slides.length - 1 == currentIndex) ? (this.options.circular ? 0 : currentIndex) : currentIndex + 1;
} else {
var nextIndex = 1;
}
if (nextIndex == 0 && this.options.circular && this.options.effect != 'fade') {
this.scroller.scrollLeft = 0;
this.scroller.scrollTop = 0;
nextIndex = 1;
}
if (nextIndex > this.slides.length - (this.options.visibleSlides + 1)) {
nextIndex = this.slides.length - this.options.visibleSlides;
}
this.moveTo(this.slides[nextIndex]);
}
您也可以向我們展示一些您的JS代碼。 – 2010-05-31 08:41:10