我原来的javascript:
- JScript code
[{"p":"/riskmanagement/UploadFiles/201201/2012012186089097.jpg","l":"http://localhost/riskmanagement/html/?207.html","t":"新年大家都达成心愿,心想事成"},{"p":"/riskmanagement/UploadFiles/201201/2012012178264313.JPG","l":"http://localhost/riskmanagement/html/?206.html","t":"新年好"},]);
现在我想做成动态的,就用了asp,可是不会写了?
- JScript code
$.ajax({ url: 'http://localhost/riskmanagement/itest.asp', type: 'GET', dataType: 'json', success: //请教怎么写??} }); };
------解决方案--------------------
success: function(data){
data = data[0];
for(var i in data) {
alert(i+":"+data[i]);
}
}