dpxua26604 2016-08-05 02:24
浏览 54

将id通过<a>标签传递给bootstrap模态PHP

I have a list of items on the webpage and to the right I have Edit buttons.

echo '<a href="#myModal?id='.$row['id'].'" data-toggle="modal" >';

How do I properly pass parameter trough <a> tag to the bootstrap modal? My code above doesn't work with ?id='.row['id']' part. I'm getting the Error: Syntax error, unrecognized expression: #myModal?id=12. But <a href="#myModal data-toggle="modal">Edit</a> opens bootstrap modal.

Thank you

  • 写回答

2条回答 默认 最新

  • douwan2664 2016-08-05 02:48
    关注

    You are not passing the value through this..

    href="#myModal?id='.$row['id'].'"

    because this is the modals name..

    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料