zoukankan      html  css  js  c++  java
  • Layui 表格编辑

    html代码

    <td class="My_edit"></td>

    Jquery代码

    //-----[Layui表格编辑()] 
    function Layui_edit(){
       //点击时 选中文本 $(
    ".My_edit").live("click",function(){ $(this).toggle(function(){ var text=$(this).html(); $(this).html('<input type="text" style="min-height:24px;" class="layui-input layui-table-edit" value="'+text+'">'); $(this).children("input").val("").focus().val(text); $(this).children("input").select(); },function(){ $(this).html($(this).children("input").val()); }) }) //数据可编辑 $(".My_edit").toggle(function(){ var text=$(this).html(); $(this).html('<input type="text" style="min-height:24px;" class="layui-input layui-table-edit" value="'+text+'">'); $(this).children("input").val("").focus().val(text); $(this).children("input").select(); },function(){ $(this).html($(this).children("input").val()); }) //数据编辑失去焦点失效 $(".layui-table-edit").live("blur",function(){ var text=$(this).val(); $(this).parent().html(text); }) } //-----[Layui表格编辑END]
  • 相关阅读:
    操作系統3-內存管理(請求分頁內存管理)
    c++对象的内存模式
    操作系統3-內存管理(虛擬存儲器)
    单词统计续
    团队冲刺八
    团队冲刺七
    团队冲刺六
    团队冲刺五
    关于文件读写的各种操作
    单词统计
  • 原文地址:https://www.cnblogs.com/yirenipeng/p/10704076.html
Copyright © 2011-2022 走看看