x-editable开源地址:https://github.com/vitalets/x-editable
效果展示:
具体实现方式
1、首先通过文章开头的开源项目地址下载x-editable到本地,引入x-editable-1.5.1\dist\bootstrap3-editable下的文件到项目中:
<link href="/css/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="/css/plugins/x-editable/bootstrap-editable.css">
<link href="/css/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" />
<script src="/js/jquery-1.9.1.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/plugins/bootstrap-table/editable/bootstrap-table.js"></script>
<script src="/js/plugins/x-editable/bootstrap3-editable/js/bootstrap-editable.js"></script>
<script src="/js/plugins/bootstrap-table/editable/bootstrap-table-editable.js"></script>
<script src="/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.js"></script>
本人的html代码中通用部分整合到了一个html里,引用到x-editable的html页面代码如下:
<!DOCTYPE html>
<html>
<m