I´m trying to change an input value automatically. This is what i've got.
<input hidden="" id="inp" type="text hidden" value="YES" />
<script type="text/javascript">
function checkInputValue() {
var files = {
'YES': 'audio/timbre.mp3',
'NO': 'audio/timbre2.mp3'
};
var sound = new Audio(files[$('#inp').val()]);
sound.play();
}
checkInputValue();
</script>
There is a hidden input in HTML with a default value "YES". I'd like to change this value to "NO" automatically when 2 seconds has passed.
Anyway doing this?
Thanks.