boolean matchBracket( String str ) { Stack stack = new Stack(); try { for ( int i = 0; i < str.length(); i++ ) { char curChar = str.charAt( i ); switch ( curChar ) { case '[': case '{': case '(': stack.push( curChar ); break; case ']': if ( !stack.po…
现在有一个数据,需要你渲染出对应的列表出来: var data = [ {"id":1}, {"id":2}, {"id":3}, {"id":4}, ]; var str="<ul>"; data.forEach(function(v,i){ str+="<li><span>"+v.id+"</span></li>&…
转自博客园: 现在有一个数据,需要你渲染出对应的列表出来: var data = [ {"id":1}, {"id":2}, {"id":3}, {"id":4}, ]; var str="<ul>"; data.forEach(function(v,i){ str+="<li><span>"+v.id+"</span></…