js
共 12 篇文章
fixChildNode
function fixNodeList(obj){ var o=obj.childNodes; var size=o.length; alert(size); var p=[]; var index=0 for(var i=0;i<size;i++){ var item=o[i]; if(item.nodeType !=1){ //alert("item="+item +" i="+ i); p[index]=item; index++; } } for(var i=0;i<p.length;i++){ obj.removeChild(p[i]); } return obj.childNo…
2013-11-26 22:46 · js
Ext.Window更换iframe的地址
Ext.window一般是类似 Ext.viewport样的是可以放 formpanel,grid等 这些都是在同一个页面中,只是有js生成。如果你要求window里面放一个url 链接到另一个页面 如nextPage.jsp 那么就要用到iframe 发给例子给你吧 var url = ../game/game.action"; var win = new Ext.Window({ title : '新页面', // maximizable : true, // maximized : true, width : 780, height : 470, // autoScroll : tru…
2009-11-09 11:58 · js · EXT · JSP
js的constructor callee caller
<script type="text/javascript"> var name ="window method"; function parentClass() { this.name = "parentClass method"; this.method = function() { alert(this.name); } } function subClass() { //var method = this.method; //this.name ="test"; this.method = function() { //method.call(this);//如果不用这一步而用下面的…
2009-11-06 17:35 · js · prototype · JavaScript
js 移动限制
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <style type="text/css"> html,body{margin:0px; padding:0px; font-family:Georgia, "Times New Roman", Times, serif; font-size:12px;} </style> </head> <body> <div style="margin:50px;line-height:200px; text…
2009-11-06 17:34 · js · HTML · CSS · JavaScript
Ext Extends test
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>js</title> <style> .btUi { border: solid 1px green; } </style> <link type="text/css" media="all" rel="Stylesheet" href=…
2009-11-06 17:33 · js · HTML · CSS · EXT · prototype · JavaScript
panel自适应高度
/* monitorResize: true, doLayout: function() { this.setWidth(window.screen.width); Ext.grid.GridPanel.prototype.doLayout.call(this); } ,*/ listeners :{ bodyresize:function() { this.setWidth(window.screen.width); } }
2009-11-06 17:30 · js · EXT · prototype
EXt ComBox
Ext combox从后台取值 var RecordDef = Ext.data.Record.create([ {name: 'id'},{name: 'name'} ]); var cityStore = new Ext.data.Store({ proxy:new Ext.data.HttpProxy({url:'comboxdata.php'}), reader:new Ext.data.JsonReader({id:"id",totalProperty:"restults",root:"row"},RecordDef), listeners :{load : function(){…
2009-11-06 17:26 · js · PHP · EXT
BSTR、LPSTR和LPWSTR
在Visual C++.NET的所有编程方式中,我们常常要用到这样的一些基本字符串类型,如BSTR、LPSTR和LPWSTR等。之所以出现类似上述的这些数据类型,是因为不同编程语言之间的数据交换以及对ANSI、Unicode和多字节字符集(MBCS)的支持。 那么什么是BSTR、LPSTR以及LPWSTR呢? BSTR(Basic STRing,Basic字符串)是一个OLECHAR*类型的Unicode字符串。它被描述成一个与自动化相兼容的类型。由于操作系统提供相应的API函数(如SysAllocString)来管理它以及一些默认的调度代码,因此BSTR实际上就是一个COM字符串,但它却在…
2009-10-19 16:10 · js · C · C++ · 数据结构 · C# · MFC
Js:数组的各种方法范例pop,push,unshift,splice,shift
2008-02-18 15:26 <script> Array.prototype.pop=function(){ if(this.length!=0)this.length--; return this; } /* pop 方法 移除数组中的最后一个元素并返回该元素。 arrayObj.pop( ) 必选的 arrayObj 引用是一个 Array 对象。 说明 如果该数组为空,那么将返回 undefined。 */ var a=[1,2,3,4] a.pop() alert(a) alert(a.pop()) </script> <script> /* push 方法 将新元素添加到一个…
2008-11-18 11:08 · js · F# · prototype
Ie和firefox的Js区别
1. 对象问题 1.1 Form对象 现有问题: 现有代码这获得form对象通过document.forms("formName"),这样使用在IE 能接受,MF 不能。 解决方法: 改用 作为下标运算。改为document.forms["formName"] 备注 上述的改用 作为下标运算中的formName是id而name 1.2 HTML对象 现有问题: 在 IE 中,HTML 对象的 ID 可以作为 document 的下属对象变量名直接使用。在 MF 中不能。 document.all("itemName")或者document.all("itemId") 解决方法: 使用对象ID…
2008-08-14 11:32 · js · HTML · CSS · Firefox · JavaScript · IE
js div
scrollHeight: 获取对象的滚动高度。 scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离 scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离 scrollWidth:获取对象的滚动宽度 offsetHeight:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度 offsetLeft:获取对象相对于版面或由 offsetParent 属性指定的父坐标的计算左侧位置 offsetTop:获取对象相对于版面或由 offsetTop 属性指定的父坐标的计算顶端位置 event.clientX 相对…
2008-07-09 17:49 · js · CSS · Firefox · JavaScript · XHTML · IE
iis不能运行asp的解决办法
iis只可以运行html就是运行不了asp提示这个东西 Server Application Error The server has encountered an error while loading an application during the processing of your request. Please refer to the event log for more detail information. Please contact the server administrator for assistance.就是这个错误 解决的办法:用以下方法可以解决,方便快捷,…
2008-06-02 15:39 · js · ASP · IIS · XP · Microsoft