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.

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

报告相同问题?

悬赏问题

  • ¥15 求解 yolo算法问题
  • ¥15 虚拟机打包apk出现错误
  • ¥30 最小化遗憾贪心算法上界
  • ¥15 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 逻辑谓词和消解原理的运用
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。