var texts = '';
$.ajax({
type: "get"
,dataType: "xml"
,url: "./keyword.xml"
,success: function(xml){
for(i=1; i<=5; i++){
var id = $(xml).find("Query[id='"+i+"']").attr("id");
var title = $(xml).find("Query[id='"+i+"']").attr("word");
var updown = $(xml).find("Query[id='"+i+"']").attr("updown");
if(updown == "u"){
updown = "<img src=images/upic.jpg width=7 height=8 />";
}else if(updown == 'd'){
updown = "<img src=images/downic.jpg width=7 height=8 />";
}else if(updown == 'c'){
updown = "-";
}else if(updown == 'n'){
updown = "<img src=images/newic.jpg />";
}
texts += "<table border=0 width=100%>";
texts += "<tr><td width=7% align=left>"+ id + "</td>";
texts += "<td width=80% height=21 align=left>"+ title + "</td>";
texts += "<td width=80% height=21 align=left>"+ updown + "</td></tr>";
texts += "</table>";
}
$("#bskeyword").html(texts);
}
,error: function(){ alert("xml error!!"); }
});
$.ajax({
type: "get"
,dataType: "xml"
,url: "./keyword.xml"
,success: function(xml){
for(i=1; i<=5; i++){
var id = $(xml).find("Query[id='"+i+"']").attr("id");
var title = $(xml).find("Query[id='"+i+"']").attr("word");
var updown = $(xml).find("Query[id='"+i+"']").attr("updown");
if(updown == "u"){
updown = "<img src=images/upic.jpg width=7 height=8 />";
}else if(updown == 'd'){
updown = "<img src=images/downic.jpg width=7 height=8 />";
}else if(updown == 'c'){
updown = "-";
}else if(updown == 'n'){
updown = "<img src=images/newic.jpg />";
}
texts += "<table border=0 width=100%>";
texts += "<tr><td width=7% align=left>"+ id + "</td>";
texts += "<td width=80% height=21 align=left>"+ title + "</td>";
texts += "<td width=80% height=21 align=left>"+ updown + "</td></tr>";
texts += "</table>";
}
$("#bskeyword").html(texts);
}
,error: function(){ alert("xml error!!"); }
});
'Programming > Etc' 카테고리의 다른 글
PL/SQL 커서 만들기 예제 (0) | 2010.11.19 |
---|---|
[세련된 자바 웹 프로그래머 되기] ① 기본기 갈고닦기 (0) | 2009.10.20 |
[펌]프로젝트 산출물 (0) | 2009.10.20 |