数据库结构
| 代码如下 | 复制代码 |
|
-- phpMyAdmin SQL Dump SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- -------------------------------------------------------- 立即学习“PHP免费学习笔记(深入)”; -- CREATE TABLE IF NOT EXISTS `customer` ( -- INSERT INTO `customer` (`id`, `username`, `solutation`, `phone`, `company`, `mobile`, `source`, `sdate`, `job`, `web`, `email`, `createtime`, `modifiedtime`, `note`) VALUES |
|
php代码
| 代码如下 | 复制代码 | ||||||||||||||||||||||||
|
include_once("connect.php"); <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.jeditable.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script> <script type="text/javascript"><br>$(function(){<br>$('.edit').editable('save.php');<br>$('.edit_select').editable('save.php', {<br>loadurl : 'json.php',<br>type : "select",<br>style : 'display: inline'<br>});<p>$(".edit_email").editable('save.php', {<br>type : 'email',<br>select : true<br>});<br>$(".edit_mobile").editable('save.php', {<br>type : 'mobile',<br>select : true<br>});<br>$(".edit_web").editable('save.php', {<br>type : 'url',<br>select : true<br>});<br>});<br></script> 可编辑的表格:jQuery+PHP实现实时编辑表格字段内容
提示:点击表格中字段对应的内容即可进行在线编辑。
|
|||||||||||||||||||||||||
sava.php代码
| 代码如下 | 复制代码 |
|
include_once("connect.php"); $field=$_POST['id']; $val=$_POST['value']; |
|
例下载地址:http://file.phprm.com/download/2013/05/16/3788_72817.rar
本文地址:
转载随意,但请附上文章地址:-)










