将表td中的值传递给bootstrap模式形式

时间:2017-12-10 17:20:28

标签: javascript php jquery twitter-bootstrap-3 codeigniter-3

我的问题与boosttarap和javascript相关,而不是PHP

我正在使用codeIginter以下代码来生成具有以下汇率的货币表

<div class='table-responsive'>
    <?PHP
        $template = array(
            'table_open' => '<table class="table table-bordered">'
         );
         $this->table->set_template($template);
         $this->table->set_heading("العملة","سعر الصرف","تاريخ تعديل سعر 
         الصرف","أفتراضي","تعديل",'حذف');

        foreach($currencies->result() as $currency){
             $edit_link  = anchor('#', '<img src='.base_url()."/assets/extras/icons/edit.png".'>', array('class'=>' img-responsive','data-toggle'=>'modal','data-target'=>'#login-modal','onClick'=>'alert("hi");'))." ";
             $delete_link = anchor('#','<img src='.base_url()."/assets/extras/icons/delete.png".'>', array('class'=>'img-responsive'));
             $this->table->add_row($currency->cur_name,$currency->cur_ex_rate,$currency->cur_ex_modified_date,$currency->cur_default,$edit_link,$delete_link);
        }
        echo $this->table->generate();

    ?>
</div>

table generated

bootsrap modal with form

编辑图像打开bootsrap模态进行编辑 我的问题是如何将td的值传递给模态的形式

0 个答案:

没有答案