方法一:

直接用找到对应dom元素调用.click()方法

$('.user_content').click(function(){
    $(this).children()[0].click();  //Dom元素执行点击事件
  //或者Dom元素执行点击事件

$(this).children('input[type="radio"]')[0].click();
}

 

 

方法二:

参考:https://blog.csdn.net/qq_37000055/article/details/101562653

html

<div class="tempStyle" @click="checked($event)">
      <input class="hy-radio" type="radio" name="a"><label>选项1</label>
    </div>
    <div class="tempStyle" @click="checked($event)">
      <input class="hy-radio" type="radio" name="a"><label>选项2</label>
    </div>

对应js

method: {
    checked(e) {e.currentTarget.firstElementChild.click();}      
}

 

相关文章:

  • 2021-08-18
  • 2021-11-20
  • 2022-12-23
  • 2021-07-08
  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-08
  • 2021-09-10
  • 2021-08-11
  • 2021-08-03
相关资源
相似解决方案