File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,8 +11,20 @@ var listTable = $("#_block_content_exam_1>form>table>tbody")
1111var rows = listTable . rows ;
1212var results = [ ] ;
1313for ( var i = 0 ; i < rows . length ; i ++ ) {
14+ console . log ( "current index " + i )
1415 var item = rows [ i ] ;
15- var text = item . children [ 1 ] . children [ 1 ] . children [ 0 ] . children [ 1 ] . children [ 0 ] . children [ 1 ] . innerText
16+
17+ var tagName = item . children [ 1 ] . children [ 1 ] . children [ 0 ] . children [ 1 ] . children [ 0 ] . children [ 0 ] . tagName ;
18+ var text = "" ;
19+ console . log ( "current tagName= " + tagName )
20+ if ( "SPAN" == tagName ) {
21+ text = item . children [ 1 ] . children [ 1 ] . children [ 0 ] . children [ 1 ] . children [ 0 ] . children [ 0 ] . children [ 0 ] . children [ 1 ] . innerText ;
22+ } else {
23+ text = item . children [ 1 ] . children [ 1 ] . children [ 0 ] . children [ 1 ] . children [ 0 ] . children [ 1 ] . innerText ;
24+ }
25+
26+
27+
1628 // "[参考答案:B] 分值:5"
1729
1830 var index_a = text . indexOf ( ":" ) + 1 ;
You can’t perform that action at this time.
0 commit comments