MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / Random_USer

Function Random_USer

assets/js/randomuser.js:101–121  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

99})
100
101function Random_USer() {
102
103 $.ajax({
104 url: 'https://randomuser.me/api/',
105 dataType: 'json',
106 success: function (data) {
107 UserName.innerText = data.results[0].name.first
108 User_Country.innerText = data.results[0].location.country
109 User_City.innerText = data.results[0].location.city
110 User_Dob.innerText = data.results[0].dob.date
111 User_Age.innerText = data.results[0].dob.age
112 User_Gender.innerText = data.results[0].gender
113 User_Email.innerText = data.results[0].email
114 User_PhoneNumber.innerText = data.results[0].cell
115 UserImage.innerHTML = ` <img src=" ${data.results[0].picture.large}" alt="img" srcset="" width="150px" height="150px">`
116 console.log(data);
117 }
118
119 });
120
121}
122function Indian_USer(Data) {
123
124 var Indexnumber= Math.floor(Math.random()*4)

Callers 1

randomuser.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected