发布一个通用面板程序(htc)
来源:互联网 发布:邪恶爱之知可知子伯母 编辑:程序博客网 时间:2024/06/03 17:01
panel.htc
<PUBLIC:PROPERTY NAME="ImagesSrc" /><PUBLIC:PROPERTY NAME="PanelCaption" /><PUBLIC:ATTACH EVENT="ondocumentready" HANDLER="DoInit" /><PUBLIC:ATTACH EVENT="onclick" HANDLER="load" /><SCRIPT LANGUAGE="jscript">window.Panel=new Array();function DoInit(){ if (!element.document.getElementById("oPanelHeader")){ inithtml='<table height="31" cellSpacing="0" id="oPanelHeader" cellPadding="0" width="98%" border="0" align="center" >'+ '<tr>'+ ' <td class="plTitleSpace" width="1%" height="31"> </td>'+ ' <td class="plTitleSelect" width="15%" height="31" isTitle="true">'+ ' <table style="FONT-SIZE: 12px" height="25">'+ ' <tr>'+ ' <td><IMG height="18" src="'+ImagesSrc+'" width="18"></td>'+ ' <td vAlign="bottom">'+PanelCaption+'</td>'+ ' </tr>'+ ' </table>'+ ' </td>'+ ' <td class="plTitleSpace" width="*%" height="31"> </td>'+ '</tr>'+ '</table>'; element.insertAdjacentHTML("beforeBegin",inithtml); oPanelHeader.attachEvent("onclick",oPanelHeaderClick); } else{ var rows=oPanelHeader.rows[0]; var cell=rows.insertCell(rows.cells.length-1); cell.className="plTitleSpace"; cell.width="1%"; cell.innerHTML=" "; var cell=rows.insertCell(rows.cells.length-1); cell.className="plTitleUnSelect"; cell.isTitle="true"; cell.width="15%"; cell.innerHTML= '<table style="FONT-SIZE: 12px" height="25">'+ ' <tr>'+ ' <td><IMG height="18" src="'+ImagesSrc+'" width="18"></td>'+ ' <td vAlign="bottom">'+PanelCaption+'</td>'+ ' </tr>'+ '</table>'; } window.Panel[window.Panel.length]=element;}function oPanelHeaderClick(){ var e = GetObj(window.event.srcElement); if (e) if (e.className=="plTitleUnSelect"){ for(i=0;i<window.Panel.length;i++){ window.Panel[i].className="plPanelUnSelect"; oPanelHeader.rows[0].cells[i*2+1].className="plTitleUnSelect"; } window.Panel[(e.cellIndex+1)/2-1].className="plPanelSelect"; e.className="plTitleSelect"; }}function GetObj(src){ if (src.parentElement.tagName!="BODY"){ if (src.isTitle=="true") return src; return GetObj(src.parentElement) } return null;} </script>
Common.css
.plTitleSelect{border-right: #999999 1px solid;border-top: #999999 1px solid;font-size: 12px;border-left: #999999 1px solid;cursor: hand;border-bottom: #999999 0px solid;background-color: #ffffff;text-align: center;}.plTitleUnSelect{border-right: #999999 1px solid;border-top: #999999 1px solid;font-size: 12px;border-left: #999999 1px solid;cursor: hand;border-bottom: #999999 1px solid;background-color: #ececec;text-align: center;}.plTitleSpace{font-size: 12px;border-bottom: #999999 1px solid;text-align: center;}.plPanelSelect{border-right: #999999 1px solid;border-top: #999999 0px solid;display: block;font-size: 12px;border-left: #999999 1px solid;border-bottom: #999999 1px solid;background-color: #ffffff;behavior: url(panel.htc);}.plPanelUnSelect{border-right: #999999 1px solid;border-top: #999999 0px solid;display: none;font-size: 12px;border-left: #999999 1px solid;border-bottom: #999999 1px solid;background-color: #ffffff;behavior: url(panel.htc);}
index.htm
<HTML><HEAD><META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"><TITLE></TITLE><LINK href="Common.css" type="text/css" rel="Stylesheet"></HEAD><BODY><br><form><table class="plPanelSelect" id="oContent" height="90%" cellSpacing="0" cellPadding="0" width="98%" border="0" ImagesSrc="sheet.gif" PanelCaption="个人信息" align="center"> <tr> <td width="100%" align="center" valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="0" height="107"> <tr> <td colspan="2" height="26"> </td> </tr> <tr> <td height="26" width="50%">用户名:</td> <td width="50%" height="26">密码:</td> </tr> <tr> <td height="26" width="50%"></td> <td width="50%" height="26"> </td> </tr> <tr> <td height="27" width="50%">姓名:</td> <td width="50%" height="27"> </td> </tr> <tr> <td height="27" width="50%"><input type="submit" value="test" name="es"> </td> <td width="50%" height="27"></td> </tr> </table> </td> </tr></table><table class="plPanelSelect" id="oContent" height="90%" cellSpacing="0" cellPadding="0" width="98%" border="0" ImagesSrc="sheet.gif" PanelCaption="详细信息" align="center"> <tr> <td width="100%" align="center" valign="top">gdfgdfgdf </td> </tr></table>
</form></BODY></HTML>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>- 发布一个通用面板程序(htc)
- 发布一个通用面板程序(htc)
- 一个封装的QQ面板控件(HTC)
- 编写控制面板程序的一个例子
- 发布一个图片抽奖程序
- 如何发布一个Qt程序
- 编写控制面板程序的一个例子 (转)
- 一个通用的JSP分页程序
- 一个通用的JSP分页程序
- 一个通用的表单验证程序
- 准备写一个通用的采集程序
- 一个简单的GridView分页通用程序
- 一个通用的表单验证程序
- 一个通用的表单验证程序
- 一个通用的表单验证程序
- Java一个通用的数据库导出程序
- 一个通用的SQL客户程序
- 一个交换程序的通用版本
- .Net的Outofmemory异常及大内存使用
- 配置管理工具
- IDesign C#编程规范(一)
- 妙手空空 --- 如何实现Asp与Asp.Net共享Session
- NET开源项目介绍及资源推荐
- 发布一个通用面板程序(htc)
- NDoc: Make good use of your XML Comments.
- PINVOKE.NET: Do interop the wiki way!
- VB6.0自制Line控件时实现X1,Y1,X2,Y2属性
- 走迷宫C#版(二)
- 锁的用处及脏读、不可重复读和幻觉读的概念
- 如何在调用线程的时候传递参数
- 海龟交易法则(中译文)
- Visual Studio 2005 Express Beta 开始下载