为什么我不能通过我的事件监听器方法将参数传递给我的函数?

时间:2017-02-28 19:18:08

标签: javascript javascript-events

我的JS到这里<input type='radio'id="Hero"/>下面的一系列功能让单选按钮一旦被点击即可取消选中

   var hero=document.getElementById('Hero');

     hero.addEventListener('onclick',"bye(this)");

    function bye(this){
        var check=this.id;/////Here i am getting  the id of the element
        hoya(); 
       if(c%2==0){
        check.checked=false;
      }
    }

    function hoya(){
      ++c;
      return c; 
 }

0 个答案:

没有答案