您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

PHP实现快速排序效果

2024/4/5 13:08:54发布21次查看
在后台我们经常遇到文章排序功能,今天我们就在表格里面加个排序字段,实现实时排序功能。
也就是文章按照由小到大的顺序排序。
文章列表
用户名  
            内容  
            排序
')>
点击排序出现输入框,和确认方法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元
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product