I need help on the lines below where video and image appear when I type the photo
var nota = document.getElementById("text").value;
function limparimg() {
document.getElementById("div").innerHTML = "";
}
function limparvid() {
document.getElementById("video").innerHTML = "";
}
function videoof() {
var video = document.getElementById("video");
var video = video.className;
var iFrame = document.getElementById("caixa");
iFrame.src = "https://www.youtube.com/embed/" + video;
}
function mostracav() {
var foto = "<img src=http://www.ficasimples.com.br/eliza/cavit.jpg>";
new Array(10);
document.getElementById("div").innerHTML = foto;
}
function talk() {
var nota = document.getElementById("text").value;
var vid = "vid";
if (nota == "vid") {
videoof();
}
var qya = "foto";
if (nota == "foto") {
mostracav();
}
}
<h2>My First JavaScript</h2>
<div id="video" class="UJAwNkhbYWM"><iframe id="caixa" allowfullscreen="" frameborder="0" height="200" width="250"></iframe> </div>
<div id="div"><img id="img"></div>
<br> Enter Text To Play:
<input id="text" value="">
<br>
<button class="btn btn-success" onclick="talk()">Atenas
Falar!</button>
<button type="button" onclick="document.getElementById('demo').innerHTML = Date()">
Click me to display Date and Time.</button>
<p id="demo"></p>
You can check out the video and image when I type the photo.