Php Laravel,在<;上显示行值;p>;标签

Php Laravel,在<;上显示行值;p>;标签,php,laravel,blade,Php,Laravel,Blade,我知道这应该很容易,但我不知道怎么做: 我在一个datatable上实现了多个“delet”按钮,并希望在对话框中显示一个模态:Doyoureallwantdelete:,但我不知道如何使用这个句子 我的看法是: <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria

我知道这应该很容易,但我不知道怎么做:

我在一个datatable上实现了多个“delet”按钮,并希望在对话框中显示一个模态:Doyoureallwantdelete:,但我不知道如何使用这个句子

我的看法是:

<div class="modal-content">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <div class="modal-body">
            <div id="message">
                <h3> BORRAR TIPO </h3>

                {{ Form::model($catalog["nambe"], array('method' => 'DELETE', 'id' => 'type', 'route' => array($catalog["name"].'.destroy', $catalog["id"]))) }}

                    <br>
                    <p>Do you reall want to delete: {{ //I whant to display the exactly name of that button }} </p>

                    <br>
                    {{ Form::submit('Save', array('class' => 'btn btn-danger')) }}
                    <button type="button" class="btn btn-info" data-dismiss="modal">Cancel</button>

                {{ Form::close() }}

        </div>
    //mode code below

我想显示我按下的确切类型的名称,但不知道如何操作,有人能帮我吗?谢谢

这实际上是一个javascript问题。我已经用这个解决了很多次了:

<div class="modal" id="your-modal">
<div class="modal-content">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <div class="modal-body">
            <div id="message">
                <h3> BORRAR TIPO </h3>

                {{ Form::model($catalog["nambe"], array('method' => 'DELETE', 'id' => 'type', 'route' => array($catalog["name"].'.destroy', $catalog["id"]))) }}

                    <br>
                    <p>Do you reall want to delete: <span id="deleteSentence"></span></p>

                    <br>
                    {{ Form::submit('Save', array('class' => 'btn btn-danger')) }}
                    <button type="button" class="btn btn-info" data-dismiss="modal">Cancel</button>

                {{ Form::close() }}

        </div>

&时代;
博拉尔提波
{{Form::model($catalog[“nambe”]、array('method'=>'DELETE','id'=>'type','route'=>array($catalog[“name”]..destroy',$catalog[“id”])}}

是否确实要删除:


{{Form::submit('Save',array('class'=>'btn-btn-danger'))} 取消 {{Form::close()}}
使用此脚本,您可以更改跨度的值:

<script>
    $('#your-modal').on('show.bs.modal', function (e) {
        $('#deleteSentence').html($(e.relatedTarget).data('sentence'));
    });
</script>

$(“#您的模态”).on('show.bs.modal',函数(e){
$('DeleteSession').html($(e.relatedTarget).data('session');
});
然后添加调用器按钮:

<a class="btn" data-toggle="modal" data-sentence="{{$name}}" data-target="#your-modal" href="http://some-url" >Launch Modal</a>

如果您不想将姓名与表单一起发送,则在模式中放置一个隐藏的输入字段

<a class="btn" data-toggle="modal" data-sentence="{{$name}}" data-target="#your-modal" href="http://some-url" >Launch Modal</a>