-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeedback.js
57 lines (54 loc) · 2.06 KB
/
feedback.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
let star1=document.querySelector(".head .star span .img-1");
let star2=document.querySelector(".head .star span .img-2");
let star3=document.querySelector(".head .star span .img-3");
let star4=document.querySelector(".head .star span .img-4");
let star5=document.querySelector(".head .star span .img-5");
star1.addEventListener("click",function(e){
star1.src="star (1).png";
star2.src="star.png";
star3.src="star.png";
star4.src="star.png";
star5.src="star.png";
document.querySelector(".values").textContent="Poor😫?"
})
star2.addEventListener("click",function(e){
star1.src="star (1).png";
star2.src="star (1).png"
star3.src="star.png";
star4.src="star.png";
star5.src="star.png";
document.querySelector(".values").textContent="Nice😌!";
})
star3.addEventListener("click",function(e){
star1.src="star (1).png";
star2.src="star (1).png";
star3.src="star (1).png";
star4.src="star.png";
star5.src="star.png";
document.querySelector(".values").textContent="Good🙂";
})
star4.addEventListener("click",function(e){
star1.src="star (1).png";
star2.src="star (1).png";
star3.src="star (1).png";
star4.src="star (1).png";
star5.src="star.png";
document.querySelector(".values").textContent="Very good😊"
})
star5.addEventListener("click",function(e){
star1.src="star (1).png";
star2.src="star (1).png";
star3.src="star (1).png";
star4.src="star (1).png";
star5.src="star (1).png";
document.querySelector(".values").textContent="Excellent😍";
})
// let sub="Feedback%20about%20To%20Do%20list%20web%20app";
// let body="To%20do%20list%20web%20app%20was%20"+star+"<br>"+decription;
let sub="Feedback about Quizz web app";
let title="Quizz web app was "+(document.querySelector(".values").textContent);
document.querySelector(".submit").addEventListener("click",()=>{
document.querySelector("a").href=`mailto:[email protected]?subject=${sub}.
&body=Quizz web app was ${(document.querySelector(".values").textContent)}.
${document.querySelector(".describe").value}`;
})