jq div双击变为可编辑状态

function ShowInput(element) {
    var input ="<input type='text' id='temp' style='width:100%;height:30px;' value="+ element.text()+" >";
    element.text("");
    element.append(input);
    $("input#temp").focus();
    $("input").blur(function(){
        element.html($(this).val());
    })
}
发布了38 篇原创文章 · 获赞 5 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/weixin_39423672/article/details/80743362
jq