相关疑难解决方法(0)

将动态数据传递给引导模式

我试图在模态上加载特定帖子的评论.为此,我需要将post id传递给模态,然后获取相应的注释.模态由以下内容触发:

<a class="xyz" data-toggle="modal" data-target="#compose-modal" data-id="<?php echo $list[$i]->getID(); ?>">View Comments</a>
Run Code Online (Sandbox Code Playgroud)

模式在页面底部定义如下:

<div class="modal fade" id="compose-modal" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">

        <!-- here i need to use php to fetch the comments using post id -->
        </div>
   </div>
</div>
Run Code Online (Sandbox Code Playgroud)

php jquery modal-dialog

1
推荐指数
1
解决办法
2万
查看次数

标签 统计

jquery ×1

modal-dialog ×1

php ×1