- var data = [
- {
- "name": "a",
- "***": "男",
- "email": "a@163.com"
- },
- {
- "name": "b",
- "***": "女",
- "email": "b@163.com"
- }
- ];
-
- var strHTML = "";
- $.each(data, function() {
- strHTML += "姓名:" + this["name"] + "
"; - strHTML += "性别:" + this["***"] + "
"; - strHTML += "邮箱:" + this["email"] + "
"; - })
- $("#divTip").html(strHTML);
说明:与所有的全局函数都差不多,getScript()也有一个回调函数,该回调函数在方法执行完成后执行。
原文:
阅读(627) | 评论(0) | 转发(0) |