-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditprofile.html
More file actions
39 lines (32 loc) · 1.04 KB
/
editprofile.html
File metadata and controls
39 lines (32 loc) · 1.04 KB
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
<!DOCTYPE html>
<html>
<head>
<title>Edit profile picture</title>
<link rel="stylesheet" type="text/css" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css">
<link rel="stylesheet" type="text/css" href="./editprofile.css">
</head>
<body>
<div class="main">
<div class="picdiv">
<div class="passimg"><img src="./images/upload.png"></div>
</div>
<div class="formdiv">
<h1>Change Profile Picture</h1>
<br>
<div id="profilepic" class="profilepic"></div>
<form id="myForm" action="javascript:void(0)">
<input id="upload" type="file" name="upload" style="width:200px"><br><br>
<button id="back" onclick="location.href='./index.html'" >Back</button>
<button id="submit" onclick="change()">Upload</button>
</form>
</div>
</div>
<script type="text/javascript">
function change(){
var pic = document.getElementById("upload").value;
var res = pic.substring(12, pic.length);
document.getElementById("profilepic").style.backgroundImage = "url(./images/"+res+")";
}
</script>
</body>
</html>