<!-- ---------------------------------------------------------------------
//
// Copyright 2000 Microsoft Corporation. All Rights Reserved.
//
// File: calendar.htc
//
// Description: The calendar behavior provides an easy, declarative way
// to add a standard calendar control to web pages and html
// based applications. It provides a variety of properties
// to customize the look and feel along with a strong set
// events and functionality.
//
//-------------------------------------------------------------------- -->
<script language="javascript">
//------------------------------------------------------------------------
// Attach to element events
//------------------------------------------------------------------------
element.attachEvent("onselectstart", fnOnSelectStart)
element.attachEvent("onclick", fnOnClick)
element.attachEvent("onpropertychange", fnOnPropertyChange)
element.attachEvent("onreadystatechange", fnOnReadyStateChange)
//------------------------------------------------------------------------
// Create the arrays of days & months for different languages
//------------------------------------------------------------------------
var gaMonthNames = new Array(
new Array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'),
new Array('January', 'February', 'March', 'April', 'May', 'June', 'July',
'August', 'September', 'October', 'November', 'December')
);
var gaDayNames = new Array(
new Array('S', 'M', 'T', 'W', 'T', 'F', 'S'),
new Array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'),
new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday')
);
var gaMonthDays = new Array(
/* Jan */ 31, /* Feb */ 29, /* Mar */ 31, /* Apr */ 30,
/* May */ 31, /* Jun */ 30, /* Jul */ 31, /* Aug */ 31,
/* Sep */ 30, /* Oct */ 31, /* Nov */ 30, /* Dec */ 31 )
var StyleInfo = null // Style sheet with rules for this calendar
var goStyle = new Object() // A hash of style sheet rules that apply to this calendar
var gaDayCell = new Array() // an array of the table cells for days
var goDayTitleRow = null // The table row containing days of the week
var goYearSelect = null // The year select control
var goMonthSelect = null // The month select control
var goCurrentDayCell = null // The cell for the currently selected day
var giStartDayIndex = 0 // The index in gaDayCell for the first day of the month
var gbLoading = true // Flag for if the behavior is loading
var giDay // day of the month (1 to 31)
var giMonth // month of the year (1 to 12)
var giYear // year (1900 to 2099)
var giMonthLength = 1 // month length (0,1)
var giDayLength = 1 // day length (0 to 2)
var giFirstDay = 0 // first day of the week (0 to 6)
var gsGridCellEffect = 'raised' // Grid cell effect
var gsGridLinesColor = 'black' // Grid line color
var gbShowDateSelectors = true // Show date selectors (0,1)
var gbShowDays = true // Show the days of the week titles (0,1)
var gbShowTitle = true // Show the title (0,1)
var gbShowHorizontalGrid = true // Show the horizontal grid (0,1)
var gbShowVerticalGrid = true // Show the vertical grid (0,1)
var gbValueIsNull = false // There is no value selected (0,1)
var gbReadOnly = false // The user can not interact with the control
var giMinYear = 1900 // Minimum year (1 is the lowest possible value)
var giMaxYear = 2099 // Maximum year
// Load the property values defined on the element to replace defaults
fnGetPropertyDefaults()
// Create the style sheets needed for the calendar display
fnCreateStyleSheets()
// Insert the HTML elements needed for the calendar display
fnCreateCalendarHTML()
// Update the title with the month and year
fnUpdateTitle()
// Fill in the days of the week
fnUpdateDayTitles()
// Build the month select control
fnBuildMonthSelect()
// Build the year select control
fnBuildYearSelect()
// Fill in the cells with the days of the month and set style values
fnFillInCells()
// **********************************************************************
// PROPERTY GET/SET FUNCTIONS
// **********************************************************************
//------------------------------------------------------------------------
//
// Function: fnGetDay / fnPutDay
//
// Synopsis: The day property is used to set the day of the month. The
// valid range is from 1 to the maximum day of the selected
// month & year. If a number is given outside that range, it
// is set to the closest valid value. Invalid input will cause
// an exception.
//
// Arguments: The put method requires an integer value for the day
//
// Returns: The get method will return the selected day of the month
// If the valueIsNull property is set, null is returned
//
// Notes: none
//
//------------------------------------------------------------------------
function fnGetDay()
{
return (gbValueIsNull) ? null : giDay
}
function fnPutDay(iDay)
{
if (gbLoading) return // return if the behavior is loading
iDay = parseInt(iDay)
if (isNaN(iDay)) throw 450
fnSetDate(iDay, giMonth, giYear)
}
//------------------------------------------------------------------------
//
// Function: fnGetMonth / fnPutMonth
//
// Synopsis: The month property is used to set the month of the year.
// The valid range is from 1 to 12. If a value is given
// outside that range, it is set to the closest valid value.
// Invalid input will cause an exception.
//
// Arguments: The put method requires an integer value for the month
//
// Returns: The get method will return the selected month value
// If the valueIsNull property is set, null is returned
//
// Notes: Setting the year can cause the selected "day" value to be
// reduced to the highest day in the selected month if needed.
//
//------------------------------------------------------------------------
function fnGetMonth()
{
return (gbValueIsNull) ? null : giMonth
}
function fnPutMonth(iMonth)
{
if (gbLoading) return // return if the behavior is loading
iMonth = parseInt(iMonth)
if (isNaN(iMonth)) throw 450
fnSetDate(giDay, iMonth, giYear)
}
//------------------------------------------------------------------------
//
// Function: fnGetYear / fnPutYear
//
// Synopsis: The year property is used to set the current year.
// The valid range is from minYear to maxYear. If a value is given
// outside that range, it is set to the closest valid value.
// Invalid input will cause an exception.
//
// Arguments: The put method requires an integer value for the year
//
// Returns: The get method will return the selected year value
// If the valueIsNull property is set, null is returned.
//
// Notes: Setting the year can cause the selected "day" value to be
// reduced to the highest day in the selected month if needed.
//
//------------------------------------------------------------------------
function fnGetYear()
{
return (gbValueIsNull) ? null : giYear
}
function fnPutYear(iYear)
{
if (gbLoading) return // return if the behavior is loading
iYear = parseInt(iYear)
if (isNaN(iYear)) throw 450
fnSetDate(giDay, giMonth, iYear)
}
//-------------------
javascript例子


JavaScript是一种广泛应用于网页和网络应用的编程语言,它在客户端浏览器上运行,为用户提供动态、交互式的用户体验。这个"javascript例子javascript例子"的压缩包很可能包含了一系列用于教学或示例的JavaScript代码片段,总计320个。这些例子可能是为了帮助初学者理解和掌握JavaScript的核心概念和常见用法。 在JavaScript中,你可以学习到以下关键知识点: 1. **基础语法**:包括变量声明(`var`, `let`, `const`)、数据类型(如字符串、数字、布尔、对象、数组等)、运算符(算术、比较、逻辑、赋值等)以及流程控制(条件语句`if...else`,循环`for`, `while`, `do...while`等)。 2. **函数**:JavaScript中的函数是可重用的代码块,可以接受参数并返回值。了解如何定义函数、调用函数以及使用匿名函数和箭头函数是至关重要的。 3. **事件处理**:JavaScript允许我们监听和响应用户的交互,如点击按钮、滚动页面等。事件处理函数是实现用户交互的关键。 4. **DOM操作**:Document Object Model (DOM)是HTML和XML文档的结构化表示。JavaScript可以用来遍历、修改、添加和删除DOM元素,实现动态网页效果。 5. **面向对象编程**:JavaScript支持类和原型为基础的面向对象编程。理解构造函数、原型链、继承和封装的概念对于编写复杂应用至关重要。 6. **AJAX**:Asynchronous JavaScript and XML,尽管现在更多使用JSON,AJAX允许我们在不刷新整个页面的情况下与服务器交换数据并更新部分网页内容,实现异步通信。 7. **ES6及新特性**:ECMAScript 6(也称为ES2015)引入了许多新特性和改进,如类、模板字符串、解构赋值、let/const、箭头函数、Promise、生成器等,提升了JavaScript的表达能力和开发效率。 8. **模块化**:通过CommonJS(Node.js环境)或ES6的import/export,可以组织和管理代码,避免全局污染,提高代码复用性。 9. **错误处理**:学习如何使用try/catch处理可能出现的运行时错误,并理解不同类型的JavaScript错误。 10. **Web API**:浏览器提供了一系列API,如定时器`setTimeout`和`setInterval`,地理位置API,以及Canvas绘图API等,可以利用这些API实现丰富多样的功能。 这个压缩包中的320个例子很可能覆盖了上述知识点,每个例子可能针对一个特定主题或技术。通过阅读和实践这些例子,学习者能逐步掌握JavaScript的精髓,提升编程技能。在实践中学习是掌握任何编程语言的最佳途径,因此这个压缩包对初学者或寻求巩固JavaScript基础的人来说是一个宝贵的资源。




















































































































- 1
- 2
- 3
- 4
- 5
- 6
- 9

- #完美解决问题
- #运行顺畅
- #内容详尽
- #全网独家
- #注释完整

- 粉丝: 2
- 资源: 15
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- perl-PCP-PMDA-4.3.2-13.el7-9.x64-86.rpm.tar.gz
- 详尽注释的51单片机串口通信程序源码:含接收与传输功能及文档说明,详细的51单片机串口通信程序源码:包含接收与传输功能及文档说明,51单片机串口通信程序源码,注释详细,包含接收和传输代码,以及文档说明
- 三菱FX3U伺服控制框架标准程序详解:定位控制参数设定、驱动器接线与操作手册,适合新手学习使用 ,三菱FX3U伺服控制框架标准程序:新手定位控制指南,含公共参数设定、回原点、JOG手动与绝对/相对定位
- pinentry-qt-0.8.1-17.el7.x64-86.rpm.tar.gz
- poppler-utils-0.26.5-43.el7.1.x64-86.rpm.tar.gz
- 基于深度强化学习的热电联产系统智能经济调度:近端优化与快速决策策略,基于深度强化学习的热电联产系统智能经济调度策略:高效近端优化算法降低计算复杂度,热电联产系统智能经济调度:一种深度强化学习方法 关键
- 西门子二部六层电梯程序详解:联控功能、无需eet仿真,简洁方案说明及三部电梯程序概览,西门子二部六层电梯程序介绍:无需EET仿真使用,含联控功能,实用方案与说明及三部六层电梯程序概览,二部六层电梯程序
- 基于STM32F407微控制器的LVGL图形库推箱子比赛项目源码
- 基于Matlab Simulink的模块化建模非线性魔术轮胎PAC2002与Dugoff模型,基于Matlab Simulink的模块化建模魔术轮胎与Dugoff模型:详解建模方法,包含源码文档及学习
- 基于时域信号的逆变器阻抗模型特征值识别与稳定性分析:在线导纳识别方法的研究,基于时域信号的逆变器阻抗模型特征值识别与稳定性分析:导纳识别方法研究,基于时域信号 逆变器 阻抗模型 特征值识别 稳定性分析
- 基于MATLAB仿真的有源电力滤波器并联型APF仿真FFT分析及其谐波电流检测IPIQ法、跟踪电流控制策略研究,实现总谐波畸变率降至3%以下 ,基于MATLAB仿真的有源电力滤波器并联型APF仿真FF
- STM32DSP数字滤波器设计教程:低通滤波器的实现与性能展示源码库及MATLAB生成教程,STM32DSP库数字滤波器源码教程:MATLAB生成系数,Excel绘图演示低通滤波器功能,使用STM32
- 基于VHDL的数字密码锁设计:FPGA控制器与功能仿真及设计资料详解,基于VHDL的数字密码锁设计:FPGA控制器与功能仿真及设计资料详解,基于VHDL的数字密码锁设计,使用FPGA作为控制器,包括相
- RK3568与356X开发全套资料:包括Demo原理图、PCB及SDK等全套资源,可直接使用,支持Allegro和PADS设计 ,RK3568与356X开发全套资料:包含Demo原理图、PCB及SDK
- 基于MATLAB的IEEE-14总线系统连续功率流测试与电压稳定性分析,基于MATLAB的IEEE-14总线系统连续功率流测试与电压稳定性分析,在IEEE-14总线系统中执行连续功率流 测试环境:MA
- 电力市场出清程序:基于IEEE 14节点输电阻塞的拉格朗日乘子计算,机组与节点边际电价求解,采用MATLAB linprog函数实现,可适用于其他测试系统 ,电力市场出清程序:基于IEEE 14节点考


