易截截图软件、单文件、免安装、纯绿色、仅160KB

Javascript实现GridView无刷新选择一行

用Javascript可以实现对GridView中某一行选择,而无需进行页面的刷新。
首先要在GridView的onrowdatabound的event handler中为GridView中的每一行onclick绑定event handler (Javascript)。假如GridView代码如下:
        <asp:GridView runat="server" id="GridViewCategory" AutoGenerateColumns="False"
    Width="100%" BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid"
    BorderWidth="3px" CellPadding="4" CellSpacing="2"
ForeColor="Black" onrowdatabound="GridViewCategory_RowDataBound">
        <RowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="Description" HeaderText="Category" />
        </Columns>
        <FooterStyle BackColor="#CCCCCC" />
        <PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />                       
        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
</asp:GridView>
onrowdatabound的event handler代码如下:
        protected void GridViewCategory_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            try
            {
                if (e.Row.RowType == DataControlRowType.DataRow)
                {
 &nbs


相关文档:

JavaScript 获取对象的高度和宽度详细说明

scrollHeight: 获取对象的滚动高度。
scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离
scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离
scrollWidth:获取对象的滚动宽度
offsetHeight:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度
offsetL ......

替换Select标签的javascript类

// 下拉列表类
// PubEdition: Version 1.0.0.0
// ModifyDate: 2009-12-09 9:30:00
// FinishDate: 2009-12-09 9:30:00
// AuthorName: binbin( Mail:pl45@163.com / Tel:13893302154 )
var droplistswap=function(){};
droplistswap.prototype.originalElement=new Array();
// droplistswap.prototype.hidedropl ......

javascript运行、调试工具

      最近在学习javascript,对于如何运行调试却不了解。以为在记事本中编辑好文件后保存为htm文件,然后在浏览器中打开就可以了,但我试了多次都不成功,后来终于发现原来我在记事本中编辑保存的文件的后缀名为“.txt”。
     解决方法:“文件夹选项&rdqu ......

关于javascript内存泄露

<html>
<body>
<script type="text/JScript">
for (i=0; i<10000; i++) {    // this loop enforces the effect
    var model = new Object();
    var element = document.createElement("<br>");
    model.myElement = ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号