-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
29 lines (21 loc) · 723 Bytes
/
Copy pathmain.js
File metadata and controls
29 lines (21 loc) · 723 Bytes
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
const inputField = document.createElement("input");
document.body.appendChild(inputField);
const sendButton = document.createElement("button");
//sendButton.classList.add("button");
document.body.appendChild(sendButton);
sendButton.textContent = "Send";
response = document.createElement("p");
sendButton.addEventListener("click", () => {
const msg = inputField.value;
response.textContent =
"Your message " + " '" + msg + "' " + " has been sent to the server";
document.body.appendChild(response);
});
/*
To-Do:
- Aja serveriä kontissa --> selaimella johkin porttiin jossa html
- Luo tietokanta toiseen konttiin
- Yhteys näiden välille
- Appiin mahollisuus fetchaa tietoja kannasta
- GUI reactilla
*/