Answer the question
In order to leave comments, you need to log in
How to perform a checkbox action?
Put a tick - the thread should play, uncheck it - the thread stops.
began to sketch out the code, something does not work out
<input type="checkbox" name="qcID" id="qcID1" value="1">
<label for="qcID1">галочка стоит поет - не стоит не поет</label>
<script src='http://code.jquery.com/jquery-latest.js'></script>
<script>
$("input:checkbox").on("checked", function() {
beep();
});
var beep = (function () {
var snd = new Audio("http://music.test.ru:8000/play");
snd.play();
});
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question