2
4

1 回答 1

3

您必须在视图中创建函数。

    events: {
        "click #expense-delete-button": "deleteRow",
        "click #expense-copy-button": "copyRow",
    },

    deleteRow:function(e){
        e.preventDefault();
        //Element clicked on
        var target =  $(e.currentTarget);
        console.log('whatever you want');
    },

    copyRow:function(e){
        //Element clicked on
        var target =  $(e.currentTarget);

        console.log('copy your row');
    },

    initialize:function(){
        //view code....
    }
于 2012-12-01T15:08:17.557 回答