Linux中国  设为主页
 收藏本站
 
当前位置: > 首页 ->网站设计 ->AJAX教程 ->prototype.js 1.4 原代码阅读
  相关分类: 
AJAX教程
CSS/CSS2
Dreamweaver
Fireworks
Flash
HTML/DHTML
JavaScript
Phososhop
网页制作
  站内搜索: 
热门文章排行
热门文章排行 Ajax实现分页查询(06-04)
prototype.js 1.4 原代码阅读(04-24)
使用AjaxPro开发四级无刷新联动下拉(06-04)
在Struts应用中使用Ajax(04-24)
Ajax:拥抱JSON,让XML走开(04-24)
精采文章排行
精采文章排行 使用AjaxPro开发四级无刷新联动下拉(06-04)
微软Asp.net Ajax 1.0的AutoComplete(06-04)
Ajax实现分页查询(06-04)
Ajax实现不刷屏的前提下实现页面定时(06-04)
Ajax程序设计入门(06-04)
  ·微软Asp.net Ajax 1.0的AutoComplete控件·Ajax实现分页查询·Ajax实现不刷屏的前提下实现页面定时刷新·Ajax程序设计入门·微软的Ajax库客户端Bug总结·利用AJAX和ASP.NET实现简单聊天室 ·利用AJAX技术实现网页无刷新进度条显示·Ajax联动下拉框的实现例子·AJAX如何与后台交互

prototype.js 1.4 原代码阅读

作者:Webmaster   来源:Linux-cn.com   点击:   日期:2007-04-24 [收藏] [投稿]

  IE是否经常中毒?推荐您


      element.style.overflow = 'hidden';
  },

  undoClipping: function(element) {
    element = $(element);
    if (element._overflow) return;
    element.style.overflow = element._overflow;
    element._overflow = undefined;
  }
}

Object.extend(Element, Element.Methods);

var _nativeExtensions = false;

if(!HTMLElement && /Konqueror|Safari|KHTML/.test(navigator.userAgent)) {
  var HTMLElement = {}
  HTMLElement.prototype = document.createElement('div').__proto__;
}

Element.addMethods = function(methods) {
  Object.extend(Element.Methods, methods || {});

  if(typeof HTMLElement != 'undefined') {
    var methods = Element.Methods, cache = Element.extend.cache;
    for (property in methods) {
      var value = methods[property];
      if (typeof value == 'function')
        HTMLElement.prototype[property] = cache.findOrStore(value);
    }
    _nativeExtensions = true;
  }
}

Element.addMethods();

var Toggle = new Object();
Toggle.display = Element.toggle;

/*--------------------------------------------------------------------------*/

Abstract.Insertion = function(adjacency) {
  this.adjacency = adjacency;
}

Abstract.Insertion.prototype = {
  initialize: function(element, content) {
    this.element = $(element);
    this.content = content.stripScripts();

    if (this.adjacency && this.element.insertAdjacentHTML) {
      try {
        this.element.insertAdjacentHTML(this.adjacency, this.content);
      } catch (e) {
        var tagName = this.element.tagName.toLowerCase();
        if (tagName == 'tbody' || tagName == 'tr') {
          this.insertContent(this.contentFromAnonymousTable());
        } else {
          throw e;
        }
      }
    } else {
      this.range = this.element.ownerDocument.createRange();
      if (this.initializeRange) this.initializeRange();
      this.insertContent([this.range.createContextualFragment(this.content)]);
    }

    setTimeout(function() {content.evalScripts()}, 10);
  },

  contentFromAnonymousTable: function() {
    var div = document.createElement('div');
    div.innerHTML = '<table><tbody>' + this.content + '</tbody></table>';
    return $A(div.childNodes[0].childNodes[0].childNodes);



 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<

上一页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1617 18 19 20 21 22 23 24 25 26 27 28 29 30 31 下一页

上一篇:prototype.js1.4 版开发者手册   下一篇:prototype.js常用函数及其用法
文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论

   相关文章:
·使用AjaxPro开发四级无刷新联动下拉框

   文章评论:(1条)
  
 请留名: 匿名评论   点击查看所有评论 论坛讨论
 

 声明:刊登此文章是为了传递更多信息,文章内容仅供参考,转载请注明出处。