您现在的位置是:网站首页> 编程资料编程资料
点击按钮文字变成input框,点击保存变成文字的实现代码限制html文本框input只能输入数字和小数点input checkbox 扩大点击范围的实现方法关于input的file 控件及美化浅谈html中input只读属性readonly和disable的区别快速解决input[type=file]打开时慢、卡顿的问题
2023-10-09
445人已围观
简介 下面小编就为大家带来一篇点击按钮文字变成input框,点击保存变成文字的实现代码。小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
点击按钮文字变成input框,点击保存变成文字的实现代码
XML/HTML Code复制内容到剪贴板
- >
- <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>iPhone6std>
- <td class="edit">2td>
- tr>
- <tr height="50">
- <td>小米5td>
- <td class="edit">5td>
- 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
相关内容
- 百层迷门 第28关 图文攻略 _手机游戏_游戏攻略_
- 百层迷门 第29关 图文攻略 _手机游戏_游戏攻略_
- 百万亚瑟王满级狼娘COS效果图欣赏_手机游戏_游戏攻略_
- 靠谱助手百万亚瑟王使用教程_手机游戏_游戏攻略_
- 百万亚瑟王壕金牛使用方法详解_手机游戏_游戏攻略_
- 天天飞车怎么获取活跃值 具体方法分享_手机游戏_游戏攻略_
- 天天酷跑qq小号刷金币方法心得 天天酷跑如何利用小号刷金币_手机游戏_游戏攻略_
- 天天酷跑怎么避免刷分刷金币封号 封号几率数据分析_手机游戏_游戏攻略_
- 天天酷跑攻略 无限超级奖励模式刷分演示视频_手机游戏_游戏攻略_
- 天天酷跑安卓版QQ会员刷金币详细教程 天天酷跑攻略_手机游戏_游戏攻略_
点击排行
本栏推荐
