GridView自定义分页导航

自己做的一个项目中所运用到的技术:|

1.         日历控件(带时分秒)
2.         GridView 批量删除,自定义分页,定位页码
3.         GridView 修改
4.        GridView 鼠标经过改变行的颜色
效果如下:
GridView自定义分页导航_第1张图片
HTML:
<% @ Page Language = " C# "  AutoEventWireup = " true "  CodeFile = " StfCmpManager.aspx.cs "  Inherits = " StfCmpManager "   %>

<! DOCTYPE html PUBLIC  " -//W3C//DTD XHTML 1.0 Transitional//EN "   " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd " >

< html xmlns = " http://www.w3.org/1999/xhtml "   >
< head id = " Head1 "  runat = " server " >
    
< title > 合作商信息维护 </ title >
    
< script language = " javascript "  type = " text/javascript " >     
    
//  判断多选是否与选中项(没有选中的返回false)
    function slcNo_click()
    
... {
        
if (document.form1.checkboxname.length)
        
...{
            
for (var i=0;i<document.form1.checkboxname.length;i++)
            
...{
                
if(document.form1.checkboxname[i].checked)
                
...{
                    
return true;
                }

            }

        }

        
else
        
...{
            
if(document.form1.checkboxname.checked)
            
...{
                
return true;
            }

        }

        alert(
"请选择后再操作!");
        
return false;
    }

    
    
//  鼠标经过改变行的颜色
     if  ( ! objbeforeItem)
    
... {
        var objbeforeItem
=null;
        var objbeforeItembackgroundColor
=null;
    }
    
    function ItemOver(obj)
    
... {
        
if(objbeforeItem)
        
...{
            objbeforeItem.style.backgroundColor 
= objbeforeItembackgroundColor;
        }

        objbeforeItembackgroundColor 
= obj.style.backgroundColor;
        objbeforeItem 
= obj;
        obj.style.backgroundColor 
= "#B9D1F3";     
    }

    
//         
 
    
//  多选的全选与取消
    function checkJs(boolvalue)
    
... {
        
if(document.all.checkboxname.length>1)
        
...{
            
for(var i=0;i<document.all.checkboxname.length;i++)
            
...{
                document.all.checkboxname[i].
checked = boolvalue;            
            }

        }

        
else
            document.all.checkboxname.
checked = boolvalue;
    }

    
//
    
    
//  只有全部选中时“全选”选中
    function SingleCheckJs()
    
... {
        var flag1
=false;
        var flag2
=false;
        
        
if (document.form1.checkboxname.length)
        
...{
            
for (var i=0;i<document.form1.checkboxname.length;i++)
            
...{
                
if(document.form1.checkboxname[i].checked)
                    flag1 
= true;
                
else
                    flag2 
= true;
            }

        }

        
else
        
...{
            
if(document.form1.checkboxname.checked)
                flag1 
= true;
            
else
                flag2 
= true;
        }

        
        
if(flag1==true&&flag2==false)
            document.getElementById(
"chk").checked = true;
        
else
            document.getElementById(
"chk").checked = false;
    }

   
    
</ script >   
< script type = " text/javascript "  language = " javascript "  src = " Selecttime/calendar.js " ></ script >       
</ head >
< body >
    
< form id = " form1 "  runat = " server " >
            
< table id = " Table10 "  cellSpacing = " 0 "  cellPadding = " 0 "  border = " 0 "  Style = " z-index: 103;
            left: 21px; position: absolute; top: 20px; width:  90 % ; " >
                 < tr >
                    
< td bgColor = " #fafafa " >
                        
< FIELDSET style = " BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; BORDER-BOTTOM: #cccccc 1px solid; HEIGHT: 45px " >< LEGEND >< FONT face = " 宋体 "  size = " 2 " > 合作商查询 </ FONT ></ LEGEND >
                            
< table id = " Table1 "  height = " 40 "  cellSpacing = " 0 "  cellPadding = " 0 "  width = " 100% "  align = " center "
                                border
= " 0 " >
                                
< tr >
                                    
< td height = " 30 " >< FONT face = " 宋体 " >& nbsp; </ FONT >< FONT face = " 宋体 " >& nbsp;合作商名称
                                            
< asp:textbox id = " TStfName "  runat = " server "  BorderStyle = " Groove "  Width = " 144px " ></ asp:textbox >& nbsp; </ FONT ></ td >
                                
</ tr >
                                
< tr >
                                    
< td style = " height: 30px " >& nbsp; < FONT face = " 宋体 " >  添加时间  </ FONT >
                                        
< asp:textbox id = " StartTime "  onfocus = " setday(this) "  runat = " server "  Width = " 159px " ></ asp:textbox >& nbsp;到
                                        
< asp:textbox id = " EndTime "  onfocus = " setday(this) "  runat = " server "  Width = " 160px " ></ asp:textbox >& nbsp; & nbsp; & nbsp; < FONT face = " Times New Roman " >& nbsp; & nbsp; & nbsp; </ FONT ></ td >
                                
</ tr >
                                
< TR >
                                    
< TD height = " 30 "

你可能感兴趣的:(JavaScript,html,XHTML,asp)