[HTML5] Textbox changes value

So i have a textbox and i also have a video player.

however i would like when i press submit to change the video player url # section to the number in the textbox.

how is that possible? I know its prob done with a function.

<!DOCTYPE html>
<html>
<body>


Video #: <input type="text" name="vidnumber" value=""><br>

<input type="submit" value="Submit">

<video width="400" controls>
  <source src="www.website/video/#.mp4" type="video/mp4">
  Your browser does not support HTML5 video.
</video>


</body>
</html>

you need use javascript function to replace value in url from another input.

1 Like