cordova/phonegap onclick doesn't work

前端 未结 7 1737
小鲜肉
小鲜肉 2021-01-21 14:34

I try to create button which starts an alert after a click event. Something like that :

    
    

Apache

7条回答
  •  隐瞒了意图╮
    2021-01-21 15:19

    You can try to do the following:

    $("#boutonAlerte").on('click', function(){ 
     alert("Clicked!");
    });
    

    Then remove the onclick from your button tag and make sure that you included the jQuery library in your HTML o course.

    If you want to use JavaScript only you should do :

    
    
    
    

提交回复
热议问题