设为首页  
联系我们  
加入收藏  
网页制作 冲浪宝典 图形图像 操作系统 软件教学 编程开发 认证考试 安全技术 站长专区 文学驿站 娱乐天地 游戏天地 办公软件
文章搜索
您的位置: 首页 >> 文章首页 >> 编程开发 >> 网站制作技术 >> [ActiveX]Web中使用ListView 完全示例
精品推荐
网站制作技术点击TOP10
·网页打印问题,打印设置,打印预览,打印分页,纵打,横打及页面的边距
·Asp.net可输入下拉框服务器控件
·包过滤规则配置示例
·ISAPI_Rewrite Lite
·一个带搜索功能的网页原代码
·漂亮的日期选择器
·全角/半角的转换函数
·AWStats: Apache/IIS的日志分析工具——在GNU/Linux和Windows平台上的使用简介
·手把手教你如何免费注册国际顶级域名
·Do All in Cmd Shell
编程开发点击TOP10
·数字小键盘指法练习
·ASP.NET 程序中常用的三十三种代码
·用C语言编通讯录程序(初学者级别的)
·我写的Java学生成绩管理系统源代码
·CHK文件恢复工具
·Modem 常用AT指令集
·java笔试题
·异常java.sql.SQLException: Io exception:The Network Adapter could not establish connection
·单片机模拟I2C总线及24C02(I2C EEPROM)读写实例(源代码)
·C++经典电子书下载
精选专题

[ActiveX]Web中使用ListView 完全示例

作者: 来源:网络文章 时间:2005-12-17 22:36:36

[ActiveX]Web中使用ListView 完全示例(1)

[HTML]
<title>列表</title>
<style>
<!--
body     { font-size: 10px }
table    { font-size: 12px }
-->
</style>
<script language = 'Javascript'>
function InitList(theList, theTable, iEnd, iId, checkIt)
{
var colWidth = (document.body.clientWidth - 200) / iEnd

with(theList)
{
View = 3
BorderStyle = 0
GridLines = true
Checkboxes = checkIt
FullRowSelect = true
LabelEdit = 1

for(var i = 0; i < iEnd; i ++)
{
ColumnHeaders.Add(i + 1, 'Col' + i, theTable.rows[0].cells[i].innerText, colWidth) //, 100, myAlign)
}
for(var i = 1; i < theTable.rows.length; i ++)
{
myList.ListItems.Add( i, 'Key' + theTable.rows[i].cells[iId -1].innerText.replace(" ", ""), theTable.rows[i].cells[0].innerText.replace(" ", ""))
for(var j = 1; j < iEnd; j ++)
{
  ListItems(i).SubItems(j) = theTable.rows[i].cells[j].innerText.replace(" ", "")
}
}
Sorted = true
}
}
</script>
<script language = 'javascript' for = 'myList' event = 'ColumnClick(ColumnHeader)'>

if(ColumnHeader.SubItemIndex == myList.SortKey)
{
    if(myList.SortOrder == 0) myList.SortOrder = 1
    else myList.SortOrder = 0
    }
else
{
    myList.SortKey = ColumnHeader.SubItemIndex
    if(myList.SortOrder == 0) myList.SortOrder = 1
else myList.SortOrder == 0
    }
</script>
<script language = 'javascript' for = 'myList' event = 'ItemClick(Item)'>
var theValue = ""
 
   theValue = Item.Text + Item.Key
   for(i = 1; i <= Item.ListSubItems.Count; i ++) theValue = theValue + "\n" + Item.ListSubItems(i).Text
   myValue.value = theValue

共14页 9 7 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [148 :>

[ActiveX]Web中使用ListView 完全示例 相关文章:
[ActiveX]Web中使用ListView 完全示例 相关软件:
特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
转载请注明来源:http://www.xgdown.com