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

javascript 浮动窗口滚动.拖动

<script type="text/javascript">
 function close(){
  QQkefu.style.display="none";
  return true;
 }
  function msgBox()
 {
  this.container = "aaaa";
  this.titleheadArea = "titlehead";
  this.width = 154;
  this.height = 105;
  this.smallHeight = 20;
  this.smallId = "small";
  this.area = ( document.compatMode.toLowerCase()=="css1compat" ) ? document.documentElement : document.body;
  this.space = 5;
  this.timer;
  this.timeOut = 150;
  this.smalled = false;
  window.msgBoxListener = this;
  this.$(this.smallId).onclick= function(){msgBoxListener.toSmall()};
 }
 msgBox.prototype.flow = function()
 {
  this.$(this.container).style.position = "absolute";
  this.$(this.container).style.zIndex = "1000";
  if(this.smalled)
  {
   this.$(this.container).style.top = this.area.scrollTop + this.area.clientHeight - this.smallHeight - this.space + "px";
  }else{
   this.$(this.container).style.top = this.area.scrollTop + this.area.clientHeight - this.height - this.space + "px";
  }
   this.$(this.container).style.left = this.area.scrollLeft + this.area.clientWidth - this.width - this.space + "px";
  }
  msgBox.prototype.toSmall = function()
  {
   if(this.smalled)
   {
    this.$(this.container).style.marginTop = -this.height + "px";
    this.$(this.container).style.height = this.height + "px";
     this.smalled = false;
    this.flow();
    this.$(this.container).style.marginTop = "0px";
   }else{
    th


相关文档:

JavaScript中的JSON

 
JavaScript中的JSON
 
JavaScript是为网景浏览器做页面脚本语言而实现的一种编程语言。它现在还被很多人误解是java的子集。它是一种具有类C语法和弱对象的模式语言。JavaScript完全遵守ECMAScript语言说明书第三版。
JSON是JavaScript对象文字记号的子集。由于JSON是JavaSript的子集,所以在JavaScript里, ......

javascript写类方式之二

2、原型方式
/**
* Person类:定义一个人,有个属性name,和一个getName方法
*/
function Person(){}
Person.prototype.name = "jack";
Person.prototype.getName = function() { return this.name;}

把类的属性(字段),方法都挂在prototype上。
造几个对象测试下:
var p1 = new Person();
var ......

javascript写类方式之三

取前面两种的优点:
a、用构造函数来定义类属性(字段)
b、用原型方式来定义类的方法。
就有了第三种方式。这种方式貌似采用的人较多。
3、综合构造函数/原型
/**
* Person类:定义一个人,有个属性name,和一个getName方法
* @param {String} name
*/
function Person(name) {
this.name = name;
}
Pers ......

JavaScript 备忘录

 
function
getVerificationCode()//取得验证码
{
  
    
var
para =
new
Array(
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"9"
,
 &nbs ......

javascript:void(0)

今天看到《AJAX开发简略》中所有的<A href>都用到了javascript:void(0)
今天看了一下原来这个表达式的作用就是让当前这个超链接成为一个死链接,就是什么都不作。
以下摘自:
http://blog.csdn.net/mouyong/archive/2007/01/24/1491761.aspx
别人些的JavaScript脚本可以看到这样的代码:
<a href="javascript ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号