Showing
1 changed file
with
21 additions
and
8 deletions
| 1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
| 2 | <html> | 2 | <html> |
| 3 | - <body> | 3 | + <body><!--예산에따른 검색결과--> |
| 4 | + <% var bestindex = -1;%> | ||
| 5 | + <% var bestbenchmark = 0;%> | ||
| 6 | + <% for(var i = 1;i <= count;i++ ){%> | ||
| 7 | + <% if(searchlist[i].benchmark > bestbenchmark){%> <!--예산 내에서 가장 성능이 좋은 물품을 찾음--> | ||
| 8 | + <% bestbenchmark = searchlist[i].benchmark;%> | ||
| 9 | + <% bestindex = i;%> | ||
| 10 | + <%}%> | ||
| 11 | + <%}%> | ||
| 12 | + | ||
| 4 | <h2>Search Result <%= money %>$</h2> | 13 | <h2>Search Result <%= money %>$</h2> |
| 5 | <%if(count >= 1){%> | 14 | <%if(count >= 1){%> |
| 6 | <h4>Best Item</h4> | 15 | <h4>Best Item</h4> |
| 7 | - <%= 1 + "." + searchlist[1].name+" - ("+searchlist[1].price+"$)"%> | 16 | + <h4> |
| 8 | - <%var link = "http://www.videocardbenchmark.net/"+searchlist[1].link.toString(); %> | 17 | + <%= searchlist[bestindex].name+" - ("+searchlist[bestindex].price+"$)-(benchmark:" %> <!--bestitem출력--> |
| 9 | - <a href = <%=link%> target=_blank>link</a> | 18 | + <b><%= searchlist[bestindex].benchmark + ")" %></b> |
| 10 | - <br> | 19 | + <%var link = "http://www.videocardbenchmark.net/"+searchlist[bestindex].link.toString(); %> |
| 11 | - <h4>Second Items</h4> | 20 | + <a href = <%=link%> target=_blank>link</a> |
| 12 | - <%for(var i =2; i<=count;i++){%> | 21 | + </h4> |
| 13 | - <%= i + "." + searchlist[i].name+" - ("+searchlist[i].price+"$)"%> | 22 | + |
| 23 | + <h4>ItemList</h4> | ||
| 24 | + <%for(var i =1; i<=count;i++){%> <!--나머지 item들 출력--> | ||
| 25 | + <%= i + "." + searchlist[i].name+" - ("+searchlist[i].price+"$)-(benchmark:" %> | ||
| 26 | + <b><%= searchlist[i].benchmark + ")" %></b> | ||
| 14 | <%link = "http://www.videocardbenchmark.net/"+searchlist[i].link.toString(); %> | 27 | <%link = "http://www.videocardbenchmark.net/"+searchlist[i].link.toString(); %> |
| 15 | <a href = <%=link%> target=_blank>link</a> | 28 | <a href = <%=link%> target=_blank>link</a> |
| 16 | <br> | 29 | <br> | ... | ... |
-
Please register or login to post a comment