onclick event handler doesn't fire

前端 未结 3 991
长发绾君心
长发绾君心 2020-12-22 02:27

I have the following code:

Save changes
3条回答
  •  再見小時候
    2020-12-22 03:20

    The function should be in the global scope, if it's in an inner scope it's not accessible to the onclick=...:

    
    

    or with jQuery:

     Save changes
    
    
    

    It would be a good idea to give the an id like this:

     Save changes
    

    Then...

    $(function(){
        $('#theAnchor').click(function(){
            tinyMCE.triggerSave();
        });
    });
    

提交回复
热议问题