冰楓論壇

標題: Random User Generator 幫您製造一個身分! [打印本頁]

作者: ai1118    時間: 2014-7-14 21:27
標題: Random User Generator 幫您製造一個身分!
RandomUser is an API that provides you with a randomly generated user. These users can be used as placeholders in web mockups, and will save you time from creating your own placeholder information.



然後其實是 json 格式...
  1. {
  2.   results: [{
  3.     user: {
  4.       gender: "female",
  5.       name: {
  6.         title: "mrs",
  7.         first: "mia",
  8.         last: "evans"
  9.       },
  10.       location: {
  11.         street: "7159 edwards rd",
  12.         city: "seymour",
  13.         state: "pennsylvania",
  14.         zip: "37284"
  15.       },
  16.         email: "mia.evans22@example.com",
  17.         password: "godfather",
  18.         md5 hash: "15d628391f0eb58d7724041ab9a12ae2",
  19.         sha1 hash: "58be9e2c7f22cd75d7af3c9e175b6465b280d61d",
  20.         phone: "(471)-543-4073",
  21.         cell: "(651)-308-4754",
  22.         SSN: "160-76-1677",
  23.         picture: "http://api.randomuser.me/0.2/portraits/women/17.jpg"
  24.       },
  25.       seed: "smallRabbit"
  26.     }]
  27. }
複製代碼
調用方式:
  1. $.ajax({
  2.   url: 'http://api.randomuser.me/',
  3.   dataType: 'json',
  4.   success: function(data){
  5.     console.log(data);
  6.   }
  7. });
複製代碼





歡迎光臨 冰楓論壇 (https://bingfong.com/) Powered by 冰楓