本文主要包含按钮,文字,input框等相关知识,佚名 希望在学习及工作中可以帮助到您
点击按钮文字变成input框,点击保存变成文字的实现代码
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta charset="utf-8">
- <title>点击按钮文字变成input框,点击保存变成文字</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">件数</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>