Toggle navigation
Toggle navigation
This project
Loading...
Sign in
유승근
/
Computer-part-Recommand
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
1
Network
Create a new issue
Commits
Issue Boards
Authored by
Yuseunggeun
2020-06-04 23:53:37 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4a70ac1bca08bc681dfa18ef6da73fb01c86e002
4a70ac1b
1 parent
31e4f24f
modify index.ejs(최고성능제품 표시)
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
views/index.ejs
views/index.ejs
View file @
4a70ac1
<!DOCTYPE html>
<html>
<body>
<body>
<!--예산에따른 검색결과-->
<
% var bestindex = -1;%>
<
% var bestbenchmark = 0;%>
<
% for(var i = 1;i
<
= count;i++ ){%>
<
% if(searchlist[i].benchmark > bestbenchmark){%>
<!--예산 내에서 가장 성능이 좋은 물품을 찾음-->
<
% bestbenchmark = searchlist[i].benchmark;%>
<
% bestindex = i;%>
<
%}%>
<
%}%>
<h2>
Search Result
<
%= money %>$
</h2>
<
%if(count >= 1){%>
<h4>
Best Item
</h4>
<
%= 1 + "." + searchlist[1].name+" - ("+searchlist[1].price+"$)"%>
<
%var link = "http://www.videocardbenchmark.net/"+searchlist[1].link.toString(); %>
<h4>
<
%= searchlist[bestindex].name+" - ("+searchlist[bestindex].price+"$)-(benchmark:" %>
<!--bestitem출력-->
<b>
<
%= searchlist[bestindex].benchmark + ")" %>
</b>
<
%var link = "http://www.videocardbenchmark.net/"+searchlist[bestindex].link.toString(); %>
<a
href =
<%=link%
>
target=_blank>link
</a>
<br>
<h4>
Second Items
</h4>
<
%for(var i =2; i
<
=count;i++){%>
<
%= i + "." + searchlist[i].name+" - ("+searchlist[i].price+"$)"%>
</h4>
<h4>
ItemList
</h4>
<
%for(var i =1; i
<
=count;i++){%>
<!--나머지 item들 출력-->
<
%= i + "." + searchlist[i].name+" - ("+searchlist[i].price+"$)-(benchmark:" %>
<b>
<
%= searchlist[i].benchmark + ")" %>
</b>
<
%link = "http://www.videocardbenchmark.net/"+searchlist[i].link.toString(); %>
<a
href =
<%=link%
>
target=_blank>link
</a>
<br>
...
...
Please
register
or
login
to post a comment