- 浏览: 26162 次
- 性别:
- 来自: 深圳
文章列表
//======================================================================
//函数名称:
//功能说明:构造函数
//输入参数:控件ID
//输出参数:
//======================================================================
function CaClock(spanID){
//this._spanID = spanID;
this._intYear;
this._intMonth;
this._intDay;
...
function mask(obj){
obj.value=obj.value.replace(/[^\d]/g,'')
key1=event.keyCode
if (key1==37 || key1==39)
{
obj.blur();
nextip=parseInt(obj.name.substr(obj.name.length-1,1))
nextip=key1==37?nextip-1:nextip+1;
nextip=nextip>=4?1:nextip
nextip=nextip<=0?3:nextip
//eval( ...
在不同窗体中获取Doc文档对象
- 博客分类:
- VC
POSITION pos1 = AfxGetApp()->GetFirstDocTemplatePosition();
CWinConsoleDoc *pDoc = NULL;
while (pos1)
{
CDocTemplate* pTemplate = (CDocTemplate*)AfxGetApp()->GetNextDocTemplate(pos1);
POSITION pos2 = pTemplate->GetFirstDocPosition();
while (pos2)
{
CDocument * pDocument;
if ...
CListCtrl类似现场捕获时实时滚动
- 博客分类:
- VC
//g_bAutoScrollFlag = false时暂停页面,为true时自动滚动
//强制控件重画新增列
m_ListCtrl.Update(g_ulListLogInfoLineNum);
//如果为自动滚动
if(g_bAutoScrollFlag)
{
CRect rectItem(0);
//获取一行信息的矩形范围 m_ListCtrl.GetItemRect(g_ulListLogInfoLineNum, &rectItem, LVIR_BOUNDS);
//列 ...
/*接收前台传过来的xml数据*/
ULONG Xml_Get(char **ppChXml)
{
CHAR *pcEnvVal;
static CHAR acPostStr[60000];
ULONG ulPostLen = 0;
pcEnvVal = getenv("REQUEST_METHOD");/*获取服务器与CGI的传输方式(post/get)*/
if ( pcEnvVal == NULL )
{
ShowInternalError(-1);
return IPPBX_FAILED ...
function ExpXmlToExcel(xmlDoc)
{
var xmlField="<FIELDLIST><userid>编号</userid><username>姓名</username></FIELDLIST>";
function createXMLDOM()
{
var xmlDoc = null;
//通过对象/属性检测法,判断是IE来是Mozilla
if (!window.DOMParser && window.Activ ...
/**********函数绑定**********************************************************/
Function.prototype.bind = function (i,j){ //给内置对象Function添加bind方法
var self = this; //this指向Function的实例,并将实例复制给self
var arg = arguments;
return function(){ //创建临时函数对象
sel ...
Ext.onReady(function(){
Ext.QuickTips.init();// 浮动信息提示
Ext.BLANK_IMAGE_URL="ext/resources/images/default/tree/s.gif";
function createXMLDOM()
{
var xmlDoc = null;
//通过对象/属性检测法,判断是IE来是Mozilla
if (!window.DOMParser && window.ActiveXObject)
{
var arrVersion ...
function preventDefault(event) {
var e = event || window.event;
if (e.preventDefault)
e.preventDefault();
e.returnValue = false;
}
function judgeevent(e) {
e = e ? e : window.event;
var code = e.keyCode;
if ((code < 96 || code > 105) && (code < 48 || ...
function enterLogin(evt)
{
evt=(evt)?evt:((window.event) ? event:null);
var elem=evt.srcElement ? evt.srcElement : evt.target;
if(evt)
{
var charCode = (evt.charCode) ? evt.charCode:((evt.which) ? evt.which : evt.keyCode);
if(charCode == 13||charCode == 3)
{
if(document.a ...
if(document.all) //IE时用模态窗口打开
{
var srcFile = "winduser.html";
var winFeatures = "dialogWidth:400px;dialogHeight:495px;status:no;dialogLeft:600;dialogTop:300";
window.showModalDialog(srcFile,window,winFeatures);
}else //非IE用open打开
{
if(mnewWind ...
/*****
*****验证form表单的数据
*****
*****
********/
function CheckForm(oForm)
{
var els = oForm.elements;
//遍历所有表元素
//alert(els.length);
for(var i=0;i<els.length;i++)
{
//alert(els[i].getAttribute("check"));
//是否需要验证
if(els[i].getAttribute("check&q ...
取地址栏的参数
- 博客分类:
- JavaScript
/**********
**
*****取地址栏参数
**
*******************************/
function get_vars(wind,key)
{
var url_vars = split_vars(wind);
key = key.toLowerCase();
for(var i = 0; i < url_vars.length; i++)
{
if(url_vars[i][0].toLowerCase() == key && url_vars[i].leng ...
js代码:
// JavaScript Document
function $(id){return document.getElementById(id);}
function offset(node){
var x = node.offsetLeft;
var y = node.offsetTop;
var w = node.offsetWidth;
var h = node.offsetHeight;
var parent = node.offsetParent;
while (parent != null){
x += parent.offsetLeft;
...
var FC_ColorCounter=0;
var arr_FCColors= new Array("1941A5", "7C7CB4", "FF9933", "9900FF", "99FFCC", "CCCCFF", "669900" , "AFD8F8", "F6BD0F", "8BBA00", "A66EDD", "F984A1", "C ...