小秋的家

home

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  1 Posts :: 91 Stories :: 17 Comments :: 0 Trackbacks
        Prototype框架
        页面插入
        1.Insertion.Before类
                新建Insertion.Before类的实例,会将指定的HTML添加到指定元素之前,并且与之相邻
                示例:
                <div id="div1">original text</div>
                <script>
                //执行以下脚本以后,页面的HTML代码将变为:
                //new test<div id="div1">original text</div>
                new Insertion.Before("div1","new text");
                </script>

        2.Insertion.Top类
                新建Insertion.Top类的实例,会将指定的HTML添加到指定元素内部,位置在元素开始之后并且与之相邻
                示例:
                <div id="div1">original text</div>
                <script>
               //执行以下脚本以后,元素div1的innerHTML属性是:
                //new test original text
                new Insertion.Top("div1","new text");
                </script>

          3.Insertion.Bottom类
                新建Insertion.Bottom类的实例,会将指定的HTML添加到指定元素内部,位置在元素结束标记之前并且与之相邻
                示例:
                <div id="div1">original text</div>
                <script>
                //执行下面的脚本以后,元素div1的innerHTML属性将是
                //original text new text
                new Insertion.Bottom("div1","new text");
                </script>

          4.Insertion.After类
                新建Insertion.After类的实例,会将指定的HTML添加到指定元素之后,并且与之相邻
                示例:
                <div id="div1">original text</div>
                <script>
                //执行下面的脚本以后,页面的HTML代码将变为:
               //<div id="div1">original text</div>new text
                new Insertion.After("div1","new text");
                </script>
                
        表单支持
        1.Field.clear()
posted on 2008-08-29 14:17 棋剑小秋 阅读(177) 评论(0)  编辑  收藏 所属分类: AJAX

只有注册用户登录后才能发表评论。


网站导航: