-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
79 lines (60 loc) · 1.92 KB
/
index.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// const user = {
// "name": "ryan",
// "lastname": "ray"
// }
// let output=''
// output=`<li>${user.name}</li>`
// document.querySelector("[datos-productos]").innerHTML=output;
// console.log(JSON.stringify(output))
// const listaProductos = () => fetch("http://localhost:3000/producto")
// .then(response => {
// return response.json()
// });
// .then(data => {
// console.log(data)
// document.getElementById('content-productos').innerHTML=
// `<p>${data.price}</p>`;
// });
// const productoServices = {
// listaProductos
// }
// const nuevoProducto = (name, price, imageUrl) => {
// const card = document.createElement("div");
// const contenido =`
// <div>
// <img src=${imageUrl}/>
// <h3>${name}</h3>
// <p>${price}</p>
// </div>
// `
// card.innerHTML = contenido;
// card.classList.add("card")
// return card
// }
// const producto = document.querySelector("[datos-productos]");
// const render = async () => {
// try{
// const listaProductos = await productoServices.listaProductos()
// listaProductos.forEach(elemento => {
// producto.appendChild(nuevoProducto(elemento.name, elemento.price, elemento.imageUrl))
// });
// }
// catch(erro){
// console.log(erro)
// }
// }
// render()
// document.getElementById("registerIng__btn").addEventListener("click", "register__bt");
// function resgistro(){
// document.getElementById('sale').style.display='none';
// document.getElementById('content').style.display='none';
// document.getElementById('register').style.display='flex';
// }
function login(){
var user, pass;
user = document.getElementById('name').value;
pass = document.getElementById('email').value;
if(user == "java" && pass == "java@li.cl"){
window.location="registro.html";
}
}