用JavaScript对GridView进行上移下移,保存排序

2021-07-28 10:22:09 浏览数 (2)

代码语言:javascript复制
 <script type=”text/javascript” language=”javascript”>
         //移动排序
         function Move(part)
         {
 
           var count= document.getElementById(‘HidCount’).value;
           var temp=0;
           var index=0;
           var indexid=0
           for( i=0 ;i<=count;i  )
           {
 
             var bc=document.getElementById(‘GVLesson_Row_’ i).style.backgroundColor;
              if(bc==’#f8e0e0′)
             { 
                 index=document.getElementById(‘GVLesson_Row_’ i).rowIndex;
                 indexid=i;
                 //alert(“GoUp  “ index);
                 temp=temp 1;
             }          
           }
           if(temp<0||temp>1)
           {
 
             alert(“只能选择一节课程!”);
             return;
  

0 人点赞