
JavaScript no carga el valor de un input - undefined
Publicado por Sergio (19 intervenciones) el 29/05/2014 13:09:07
Estecodigo es posible o que hago mal.
No reproduce ni da error, simplemente no hace nada.
No reproduce ni da error, simplemente no hace nada.
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
<body>
<script>
var myVideo=document.getElementById("video");
var direccion=document.getElementById("customMediaURL").value;
myVideo.src=direccion;
function playPause()
{
if (myVideo.paused)
myVideo.play();
else
myVideo.pause();
}
</script>
<input type="text" name="customMediaURL" id="customMediaURL">
<div style="text-align:center">
<video id="video" poster="images/pantalla.png">
<source src="" type="video/mp4">
</video>
<button onclick="playPause()">Play/Pause</button>
</div>
</body>
Valora esta pregunta


0