douzhicai7148 2015-09-04 17:59
浏览 83
已采纳

如何在模态上传递php值? bootstrap 3,

I am new to bootstrap 3 and my coding doesnt seem to pass the php value to a modal? I usually code like this in bootstrap 2++, i decided to add data target also, this is my code:

<a class="btn btn-link"  
   href="#reply<?php echo $product_id; ?>" 
   data-toggle="modal" 
   data-target="#reply<?php echo $product_id; ?>">
       <i class="icon-reply"></i> 
       Reply
</a>

and for the modal:

<a class="btn btn-link"  
    href="#reply<?php echo $product_id; ?>" 
    data-toggle="modal"
    data-target="#reply<?php echo $product_id; ?>">
         <i class="icon-reply"></i> 
         Reply 
</a>

what am i missing?

  • 写回答

1条回答 默认 最新

  • dongxun7301 2015-09-04 18:58
    关注

    According to the migration guide from Bootstrap 2 to Bootstrap 3, there were a few non-compatible changes made, specifically to the modal object. It looks like in your case, you need to remove the hide class from your modal in order to work in Bootstrap 3:

    [...] you should no longer apply .hide to .modal in your markup.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 三种调度算法报错 采用的你的方案
  • ¥15 关于#python#的问题,请各位专家解答!
  • ¥15 对于这个问题的解释说明
  • ¥200 询问:python实现大地主题正反算的程序设计,有偿
  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败