简介
目的:展示Ajax请求的array数据,我们在开发中场用的Ajax网络请求然后进行对Array数据遍历展示在前端页面中,到后期如果使用Vue.js
、angular2.js
等双向绑定数据的话,就不需要进行这样的遍历方式。后期文章会讲解Vue
开发APP。
1、ajax网络请求获取数
2、展示数组数据
3、注意事项
代码分析
下面是index.html
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<link rel="stylesheet" type="text/css" href="css/common.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum- scale=1.0, user-scalable=no"/>
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="css/common.css">
<link rel="stylesheet" href="css/pintuer.css">
<link rel="styleshee