---
title: "test测试题"
author: "ihuning"
date: "2015-12-27T22:06:52Z"
tags: []
categories: ["Web前端"]
slug: "test"
draft: false
lastmod: "2015-12-27T22:09:21Z"
id: 2267014
url: "https://ihuning.iteye.com/blog/2267014"
---

测试题

 

测试题

 

```
$.ajax({
    type : "post",
    async:false,
    url : "http://localhost:8080/getArticle.do",
    data:{},
    dataType : "jsonp",
    jsonp: "callback",
    success : function(data){
        var panelStart = "<div class=\"panel panel-default\">";
        var headStart = "<div class=\"panel-heading\">";
        var bodyStart = "<div class=\"panel-body\">";
        var end = "</div>";

        var i = 0;
        var len = data.length;
        while(i < len){
            console.log(data[i]);
            var articleTitle = data[i].title;
            var articleContent = data[i].content;

            var content = panelStart + headStart + articleTitle + end + bodyStart + articleContent + end + end;
            console.log(content);
            console.log($(content));
            $("#article-list").append($(content));
            i++;
        }
```