我有下面的代码所有三个DIV具有相同的类名我想要做的是通过使用jquery索引号访问/检索第二个DIV值第二个DIV的值是3.21,我试过了使用此代码检索div.OddVal.index(2)
没有运气任何想法家伙我错了吗?使用索引号检索值jquery
<div class="ThreeWayCol OddsCol1">
<div class="OddVal ng-pristine ng-untouched ng-valid ng-binding ng-scope ng-not-empty" ng-repeat="sel in event._matchMarket.selections" ng-model="sel" ng-class="{'Sel': oddSelections[event.id].sels[sel.id]}" ng-click="selectOdd(event,event._matchMarket,sel)">3.37</div>
<div class="OddVal ng-pristine ng-untouched ng-valid ng-binding ng-scope ng-not-empty" ng-repeat="sel in event._matchMarket.selections" ng-model="sel" ng-class="{'Sel': oddSelections[event.id].sels[sel.id]}" ng-click="selectOdd(event,event._matchMarket,sel)">3.21</div>
<div class="OddVal ng-pristine ng-untouched ng-valid ng-binding ng-scope ng-not-empty" ng-repeat="sel in event._matchMarket.selections" ng-model="sel" ng-class="{'Sel': oddSelections[event.id].sels[sel.id]}" ng-click="selectOdd(event,event._matchMarket,sel)">2.07</div>
</div>
谢谢@Ori Drori,这就是我一直在寻找的,有福的。 – Wilson
活得长久而繁荣:) –