当前位置:编程学习 > asp >>

客户端CGI——结合javascript、dhtml实现bbs的backoffice(三)

//第四步,实现对栏目及相关论坛的排序,基本思路就是对数组进行重新组合排序。
function On_OrderUp()
    {
        var CategoryIndex = frmManager.selCategoryName.selectedIndex ;
        var ForumIndex = frmManager.selForumName.selectedIndex ;
        if (ForumIndex == -1 && CategoryIndex > 0)
        {
       for (var i = 0 ; i < aCategory.length ; i ++)
           {
           if (aCategory[i].CategoryID == frmManager.selCategoryName[CategoryIndex].value)
           {
          var temp = new MakeCategory(aCategory[i].CategoryID , aCategory[i].CategoryName , aCategory[i-1].OrderNum)
          aCategory[i].CategoryID = aCategory[i-1].CategoryID
          aCategory[i].CategoryName = aCategory[i-1].CategoryName
          aCategory[i].OrderNum = aCategory[i].OrderNum
          aCategory[i-1] = temp           
          On_Load()
          frmManager.selCategoryName.selectedIndex = i - 1
          On_CategoryChange()
          return true ;
           }
补充:asp教程,高级应用
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,