A better way would be to start the oscillatorNode once and connect/disconnect the oscillatorNode from the graph when needed, ie :
var ctx = new AudioContext();
var osc = ctx.createOscillator();
osc.frequency.value = 8000;
osc.start();
$(document).ready(function() {
$("#start").click(function() {
osc.connect(ctx.destination);
});
$("#stop").click(function() {
osc.disconnect(ctx.destination);
});
});
This how muting in done in muting the thermin (mozilla web audio api documentation)