也就是文章按照由小到大的顺序排序。
文章列表
用户名
内容
排序
')>
点击排序出现输入框,和确认方法function changeord(obj, id) {
var val = obj.text();
var c = obj.parent(td);
obj.parent(td).html();
c.children(input).focus();
}
function changeordconfirm(obj, id) {
var ord = obj.val();
$.post(ajax.php, {
id: id,
ord: ord
},
function(data) {
obj.parent(td).html( + obj.val() + );
})
}ajax远程操作排序顺序include_once(connect.php);
$id = isset($_post['id']) ? intval($_post['id']) : 0;
$ord = isset($_post['ord']) ? intval($_post['ord']) : 0;
if ($id > 0) {
$sql = update `wishing_wall` set `ord` = '.$ord.' where `id` = ' . $id . ';;
mysql_query($sql);
}php排序演示:http://www.sucaihuo.com/php/389.html
jquery+ajax实现排序效果.rar ( 8.93 kb 下载:21 次 )
ad:真正免费,域名+虚机+企业邮箱=0元
