茄子在线看片免费人成视频,午夜福利精品a在线观看,国产高清自产拍在线观看,久久综合久久狠狠综合

    <s id="ddbnn"></s>
  • <sub id="ddbnn"><ol id="ddbnn"></ol></sub>

  • <legend id="ddbnn"></legend><s id="ddbnn"></s>

    jQuery實(shí)現(xiàn)點(diǎn)擊按鈕文字變成input框點(diǎn)擊保存變成文字
    來(lái)源:易賢網(wǎng) 閱讀:1523 次 日期:2016-07-02 11:28:31
    溫馨提示:易賢網(wǎng)小編為您整理了“jQuery實(shí)現(xiàn)點(diǎn)擊按鈕文字變成input框點(diǎn)擊保存變成文字”,方便廣大網(wǎng)友查閱!

    這篇文章主要介紹了jQuery實(shí)現(xiàn)點(diǎn)擊按鈕文字變成input框點(diǎn)擊保存變成文字的相關(guān)資料,非常具有參考借鑒價(jià)值,需要的朋友可以參考下

    直接給大家貼代碼了。

    具體代碼如下所示:

    代碼如下:

    <!DOCTYPE html>

    <html lang="en">

    <head>

      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

      <meta charset="utf-8">

      <title>點(diǎn)擊按鈕文字變成input框,點(diǎn)擊保存變成文字</title>

      <style type="text/css">

      table{ text-align: center; font-size: 14px;}

      table>thead>tr>th{ font-weight: normal;}

      .text-right{ padding-right:73px; text-align: right;}

      .text{ width: 50px; height: 30px; border: 1px solid #ddd; text-align: center;}

      </style>

      <script type="text/javascript" src="js/jquery.min.js"></script>

    </head>

    <body>

      <table>

        <thead>

          <tr>

            <th width="400">品名</th>

            <th width="200">件數(shù)</th>

          </tr>

        </thead>

        <tbody>

          <tr height="50">

            <td>iPhone6s</td>

            <td class="edit">2</td>

          </tr>

          <tr height="50">

            <td>小米5</td>

            <td class="edit">5</td>

          </tr>

        </tbody>

        <tfoot>

          <tr>

            <td colspan="2" class="text-right">

              <button type="button" class="btn" onclick="change(this)">修改</button>

            </td>

          </tr>

        </tfoot>

      </table>

    <script type="text/javascript">

    function change(obj){

      var xg=$(obj).html();

      if(xg=='修改'){

        $('.edit').each(function(){

          var old=$(this).html();

          $(this).html("<input type='text' name='editname' class='text' value="+old+" >");

        })

        $(obj).html('保存');

      }else if(xg=='保存'){

        $('input[name=editname]').each(function(){

          var old=$(this).html();

          var newfont=$(this).parent('td').parent('tr').children().find('input').val();

          $(this).parent('td').html(newfont);

        })

        $(obj).html('修改');

      }

    }

    </script>

    </body>

    </html>

    更多信息請(qǐng)查看網(wǎng)絡(luò)編程
    由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢(xún)回復(fù)僅供參考,敬請(qǐng)考生以權(quán)威部門(mén)公布的正式信息和咨詢(xún)?yōu)闇?zhǔn)!

    2026上岸·考公考編培訓(xùn)報(bào)班

    • 報(bào)班類(lèi)型
    • 姓名
    • 手機(jī)號(hào)
    • 驗(yàn)證碼
    關(guān)于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡(jiǎn)要咨詢(xún) | 簡(jiǎn)要咨詢(xún)須知 | 新媒體/短視頻平臺(tái) | 手機(jī)站點(diǎn) | 投訴建議
    工業(yè)和信息化部備案號(hào):滇ICP備2023014141號(hào)-1 云南省教育廳備案號(hào):云教ICP備0901021 滇公網(wǎng)安備53010202001879號(hào) 人力資源服務(wù)許可證:(云)人服證字(2023)第0102001523號(hào)
    云南網(wǎng)警備案專(zhuān)用圖標(biāo)
    聯(lián)系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢(xún)關(guān)注公眾號(hào):hfpxwx
    咨詢(xún)QQ:1093837350(9:00—18:00)版權(quán)所有:易賢網(wǎng)
    云南網(wǎng)警報(bào)警專(zhuān)用圖標(biāo)