資料轉送解決思路

來源:互聯網
上載者:User
資料轉送
本帖最後由 baidu_31665039 於 2015-10-09 10:51:15 編輯


table width="100%" border="0" cellspacing="0" cellpadding="0" class="ttbb5">

序號
國家
省份
地區
操作



{if $list or [email protected] neq 0 }
{foreach from=$list item=item key=index}

{$index}
{if $item.parent_tow_id eq 2}
{$item.country}
{$item.province}
{$item.name}
{/if}
{if $item.parent_tow_id eq 1}
{$item.country}
{$item.name}

{/if}
{if $item.parent_tow_id eq 0}
{$item.name}


{/if}







{/foreach}
{else}

--暫無資料--

{/if}


{include file=warning.tpl}








input=text顯示資料庫排序的值 在文字框修改值點擊確定 怎麼傳入資料庫 改變paixu的值
------解決思路----------------------
使用ajax,擷取資料後,非同步傳遞到php
------解決思路----------------------
可以通過jquery來判斷是否出發點擊修改之操作,然後通過ajax到php修改值後再返回資訊
------解決思路----------------------
點擊“確定”時,擷取當前那一行欄目的id和paixu的值,把值發送到控制器,根據主鍵id去修改paixu的值,成功時,返回1,失敗返回0。回呼函數裡接收到1就alert成功,否則alert失敗。

你還可以直接把整個表單做成form表單,Input的name用{$item.id},value用{$item.paixu}。
提交到控制器裡,foreach遍曆$_POST,$k作為id,$v作為paixu的值,一條一條插入到資料表裡。
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.