日期:2014-05-16 浏览次数:20579 次
function getOut(){
var s='';
$.ajax({
type:'get',//请求方式
url:'out.jsp', // AJAX HTTP请求接口
data:'',//提交到服务器接口的参数 比如'{cid:0405}',结果为out.jsp?cid=0405格式
dataType:'json',//请求类型为json, 更多见jquery doc文档
timeout:7000,//请求超时后停止请求
success: function(d){
$.each(d,function(i){
s+=('<p>'+d[i].options+'</p><hr/>');//再循环两次就可以了
});
$('#out').html(s);}});
}