-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
35 lines (26 loc) · 1.25 KB
/
app.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
function editProfileButton(){
var name = document.getElementById('name').textContent
var inputName = document.getElementById('input-name')
inputName.value = name
var email = document.getElementById('email').textContent
var inputEmail = document.getElementById('input-email')
inputEmail.value = email
var interests = document.getElementById('interests').textContent
var inputInterests = document.getElementById('input-interests')
inputInterests.value = interests
document.getElementById("edit-view").style.display = "block"
document.getElementById("display").style.display = "none"
}
function updateProfileButton(){
var updatedName = document.getElementById("input-name").value
var name = document.getElementById("name")
name.textContent = updatedName
var updatedEmail = document.getElementById("input-email").value
var email = document.getElementById("email")
email.textContent = updatedEmail
var updatedInterests = document.getElementById("input-interests").value
var interests = document.getElementById("interests")
interests.textContent = updatedInterests
document.getElementById("edit-view").style.display = "none"
document.getElementById("display").style.display = "block"
}