Greater area for radio selection

后端 未结 5 492
臣服心动
臣服心动 2021-01-14 08:00

   \"\"
   

         


        
5条回答
  •  灰色年华
    2021-01-14 08:28

    This is a better way.

    $('span').click(function() {
        $(this).find('input').attr({checked:"checked"});
    });
    

    Just keep in mind that you are adding a click event to all spans. Better would be to have a class on the span and reference that.

    $('.myClickySpan')...
    
    ...
    

提交回复
热议问题