Send parameter to Bootstrap modal window?

前端 未结 4 1852
北荒
北荒 2020-12-13 04:39

I have a problem, I cannot pass any parameters to a modal window (using Bootstrap 3), I tried using the solution stated in this link, but I cannot make it work:

Dyna

4条回答
  •  清歌不尽
    2020-12-13 05:25

    I found the solution at: Passing data to a bootstrap modal

    So simply use:

     $(e.relatedTarget).data('book-id'); 
    

    with 'book-id' is a attribute of modal with pre-fix 'data-'

提交回复
热议问题