我想在点击按钮时隐藏按钮。所以在阅读StackOverflow问题和答案后,我创立了这个:
'click .stop' (event) {
Session.set(this._id + "_spinningRng", true);
document.getElementsByClassName('pause').style.display = 'none';
document.getElementsByClassName('kill').disabled = true;
document.getElementsByClassName('cmdLogs').disabled = true;
但是3条线都不起作用。
你知道吗?答案 0 :(得分:1)
我建议你包含jQuery,因为事情变得容易多了:)
然后你会这样做;
$('.stop').on('click', function() {
$('.pause').hide(); // hides a element with the class pause (adds display:none;)
$('.play').show(); // reveals a hidden element with class play
});