答案 0 :(得分:0)
你可以用jQuery或Javascript来做到这一点。假设您的按钮具有btn
类。这是jQuery函数:
$('.btn').click(function(){
$(this).css('background-color' , 'red');
});
答案 1 :(得分:0)
你可以用jquery这样的东西来做,
$(function(){
$('.question_btn').click(function(){
$('.question_btn').css('background-color','red');
$('input[type=radio]').click(function(){
$('.question_btn').css('background','green');
});
});
});

.question_btn{background-color:#fff; border:1px solid #ccc; padding:5px 10px; outline:0;}

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button type="button" class="question_btn">button 1</button>
<div class="quest_wrap">
<p>select an option</p>
<label class="radio-inline"><input type="radio" name="answer" value="1">Option 1</label>
<label class="radio-inline"><input type="radio" name="answer" value="2">Option 2</label>
<label class="radio-inline"><input type="radio" name="answer" value="3">Option 3</label>
<label class="radio-inline"><input type="radio" name="answer" value="4">Option 4</label>
</div>
&#13;