How to pass a parameter from a link element to a modal window?

后端 未结 3 1419
感情败类
感情败类 2020-12-21 13:54

I have a table. In a cell of the table there is a link like this:

3条回答
  •  忘掉有多难
    2020-12-21 14:05

    //Global Variable
    value = '';
    
    $('[href = #remoteModal]').click(function(event){
            event.preventDefault();
            value = $(this).data("id");
            $('#remoteModal').show();
    });
    

    And I think you can access to value variable everywhere in this page

提交回复
热议问题