-
Notifications
You must be signed in to change notification settings - Fork 0
/
FINAL.html
115 lines (98 loc) · 3.62 KB
/
FINAL.html
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html>
<head>
<title>WP</title>
<link rel="stylesheet" href="FINAL.css">
</head>
<body>
<?php
if (!isset($_POST['clack']){
$dream=$_POST["dream"];
$willpower=$_POST["willpower"];
$sacrifice=$_POST["sacrifice"];
}
?>
<h3 align="center">
<br>
<!-- here   ; add spaces-->
<font size="4">
<a href="try.html">Eren</a>
<a href="herr.html"> Lee</a>
<a href="baackk.html">A1 </a>
<a href="deus.html">A2</a>
<form action="maram.php" method="post">
<div id="y1">
<label>YourDream</label>
<input name="dream"id="n1" class="t1" type="text" placeholder="tell us about your dream" >
<input type="button" id="btn1" class="aa" value="Click">
<label>YourWill</label>
<input name="willpower"size="30" id="n2" class="t1" placeholder="how high and strong is your WillPower">
<input type="button" id="btn2" class="aa" value="Press">
<br>
<br>
<br>
<label>YourSacrifice</label>
<input name="sacrifice"size="50" id="n3" class="t1"placeholder="tell us about your sacrifice bc in order to get , u need to give ">
<input type="button" id="btn3" class="aa" value="Clack" name="clack" >
</div>
<button>Soo</button>
</form>
<script >
const btn1= document.getElementById("btn1");//document.querySelector(".aa");
const btn2= document.getElementById("btn2");
const btn3= document.getElementById("btn3");
var content = document.getElementById("n1");//document.querySelector(".t1") ;
const SpeechRecognition= window.SpeechRecognition ||window.webkitSpeechRecognition;
const recognition = new SpeechRecognition() ;
//recognition.start();
recognition.onstart=function(){
console.log("voice is activated , u can to microphone") ;
};
recognition.onresult = function(event) {
const current =event.resultIndex ;
const transcript = event.results[current][0].transcript;
content.value = transcript;
readOutLoud(transcript);
};
recognition.onresult = function(event) {
const current =event.resultIndex ;
const transcript = event.results[current][0].transcript;
content.value = transcript;
readOutLoud(transcript);
};
btn1.addEventListener("click",() => {
recognition.start();
content = document.getElementById("n1");
});
btn2.addEventListener("click",() => {
content = document.getElementById("n2");
recognition.onresult = function(event) {
const current =event.resultIndex ;
const transcript = event.results[current][0].transcript;
content.value = transcript;
readOutLoud(transcript);
};
recognition.start();
});
btn3.addEventListener("click",() => {
//recognition.start();
content = document.getElementById("n3");
recognition.onresult = function(event) {
const current =event.resultIndex ;
const transcript = event.results[current][0].transcript;
content.value = transcript;
readOutLoud(transcript);
};
recognition.start();
});
</script>
</h3>
</body>
</html>