Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <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>
Add Comment
Please, Sign In to add comment