javascript jquery radio button click

前端 未结 6 1193
刺人心
刺人心 2020-12-04 20:23

I have 2 radio buttons and jquery running.

 first


        
6条回答
  •  悲哀的现实
    2020-12-04 21:08

    it is always good to restrict the DOM search. so better to use a parent also, so that the entire DOM won't be traversed.

    IT IS VERY FAST

    $("input[name='myButton']",$('#radioBtnDiv')).change( function(e) { // your stuffs go here });

提交回复
热议问题