-
Notifications
You must be signed in to change notification settings - Fork 0
/
ajson.js
35 lines (27 loc) · 918 Bytes
/
ajson.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
var url = "http://universities.hipolabs.com/search?name=";
// var btn = document.querySelector("button");
// btn.addEventListener("click",async function(){
// var input = document.querySelector("input").value;
// var collArray = await getCollages(input);
// showCollages(collArray)
// })
// function showCollages(collArray)
// {
// var ul = document.querySelector("ul");
// ul.innerText = " "
// for(collges of collArray)
// {
// var list = document.createElement("li");
// list.innerText = collges.name;
// ul.appendChild(list)
// }
// }
// async function getCollages(input) {
// try{
// var result = await axios.get(url+input);
// console.log(result.data);
// return result.data;
// }catch(error){
// console.log("error are found",error);
// }
// }