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

Asp.net中自定义控件引用javascript中的日历脚本心得


自定义控件中的页面代码:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="wcontrol.ascx.cs" Inherits="wcontrol" %>
<script type ="text/javascript">
function PopupCalendar(InstanceName)
{
///Global Tag
this.instanceName=InstanceName;
///Properties
this.separator="-"
this.oBtnTodayTitle="Today"
this.oBtnCancelTitle="Cancel"
this.weekDaySting=new Array("S","M","T","W","T","F","S");
this.monthSting=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
this.Width=200;
this.currDate=new Date();
this.today=new Date();
this.startYear=1970;
this.endYear=3010;
///Css
this.divBorderCss="1px solid #BCD0DE";
this.tableBorderColor="#CCCCCC"
///Method
this.Init=CalendarInit;
this.Fill=CalendarFill;
this.Refresh=CalendarRefresh;
this.Restore=CalendarRestore;
///HTMLObject
this.oTaget=null;
this.oPreviousCell=null;
this.sDIVID=InstanceName+"oDiv";
this.sTABLEID=InstanceName+"oTable";
this.sMONTHID=InstanceName+"oMonth";
this.sYEARID=InstanceName+"oYear";
}
function CalendarInit()     ///Create panel
{
var sMonth,sYear
sMonth=this.currDate.getMonth();
sYear=this.currDate.getYear();
htmlAll="<div id='"+this.sDIVID+"' style='display:none;position:absolute;width:"+this.Width+";border:"+this.divBorderCss+";padding:2px;background-color:#FFFFFF'>";
htmlAll+="<div align='center'>";
/// Month
htmloMonth="<select id='"+this.sMONTHID+"' onchange=CalendarMonthChange("+this.instanceName+") style='width:10%'>";
for(i=0;i<12;i++)
{
htmloMonth+="<option value='"+i+"'>"+this.monthSting[i]+"</option>";
}
htmloMonth+="</select>";
/// Year
htmloYear="<select id='"+this.sYEARID+"' onchange=CalendarYearChange("+this.instanceName+") style='width:10%'>";
for(i=this.startYear;i<=this.endYear;i++)
{
htmloYear+="<option value='"+i+"'>"+i+"</option>";
}
htmloYear+="</select></div


相关文档:

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

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

ASP.NET 2.0中OWC生成柱状图和饼状图

1、首先下载owc11:owc11(http://www.svnhost.cn/Download/Detail-60.shtml)
2、引用OWC:打开"解决方案资源管理器"面板,鼠标右键单击"引用",选择"添加引用"菜单,在弹出的"添加引用"对话框中单击"COM"卡片,找到"Microsoft Office Web Components 10.0(office 2003是11.0)",单击"选择"和"确定"按钮,OWC就被添加到了引 ......

配合javascript动态操作表头

这段时间在用displayTag, 它有很多好用的功能,俺也不就在这赘述,当然也有几个不方便的地方. 比如求和后"%"的显示等与求和相关的缺点, 这里先介绍一个缺点并把我从网上整理出来的解决方案也一并帖出. 问题是这样的: 由于业务要求, 当用户鼠标位于表中某一列的标头时, 在这个表头"动画"地显示这列的简介. 先看下做出来的效果: ......

关于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 = ......

ASP.NET中Page_Load与Page_PreRender事件。


Page_PreRender 服务器控件将要呈现给其包含的 Page 控件时发生。简单的理解为page中的控件渲染调用此事件
Page_Load 服务器控件加载到 Page 控件中时发生。加载控件时发生。
这两个执行的顺序是Load先执行,PreRender后执行。
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号