Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter bootstrap 使用引导twitter模式提交表单_Twitter Bootstrap_Submit_Action - Fatal编程技术网

Twitter bootstrap 使用引导twitter模式提交表单

Twitter bootstrap 使用引导twitter模式提交表单,twitter-bootstrap,submit,action,Twitter Bootstrap,Submit,Action,我正在尝试使用引导模式提交表单。我已经成功地按照下面的代码提交了数据。我的问题是,我正在通过操作标记处理我的php,即如果($\u GET['action']='add'){//do something}等,并且我通过url发送信息。所以..当时我更改了,我在检查提交按钮是否已提交后进行了插入,这就是表单工作的原因,是否有任何方法可以通过URL发送信息并将其放入模式中?php?action=add#myModal) 此外,您是否知道如何防止模式在提交后关闭,因为我想让用户能够多次添加信息。 非常

我正在尝试使用引导模式提交表单。我已经成功地按照下面的代码提交了数据。我的问题是,我正在通过操作标记处理我的php,即如果($\u GET['action']='add'){//do something}等,并且我通过url发送信息。所以..当时我更改了,我在检查提交按钮是否已提交后进行了插入,这就是表单工作的原因,是否有任何方法可以通过URL发送信息并将其放入模式中?php?action=add#myModal)

此外,您是否知道如何防止模式在提交后关闭,因为我想让用户能够多次添加信息。 非常感谢您的帮助

<a href="#myModal" role="button" class="btn btn-large btn-primary" data-toggle="modal" data-target="#myModal">Add</a>

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria- labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4 class="modal-title" id="myModalLabel">Add</h4>
        </div>
        <div class="modal-body">

            <div class="table-responsive">
    <table class="table">
    <tr>
            <th width="275">Name</th>
            <td><input type="text" name="cname" value="" class="input-sm"></td>
    </tr>

</table>
</div>

        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            <input type="submit" value="Save" id="save_add" name="save_add" class="btn btn-primary">
         </div>
     </div>
 </div>

&时代;
添加
名称
关

名称关闭

有关于此的更新吗?我正试图在模态上传递动作和id。我已经尝试了这里提供的所有可用的解决方案,但仍然没有任何适合我的方案。任何建议都非常感谢!表单标签在哪里?请注意,代码段格式不正确,因为
class=“model footer
部分以纯文本形式显示。此外,建议至少添加一些注释,说明为什么您的答案是上述问题的正确答案。
    <form action="mypage.php" method="get"><table class="table"> <tr> <th width="275">Name</th> <td><input type="text" name="cname" value="" class="input-sm"></td> </tr> </table> </div> </div> <div
 class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <input type="submit" value="Save" id="save_add" name="save_add" class="btn btn-primary"> </div></form>