提出纯脚本的HoverMenuBehavior及冒泡提示框

1、引用相关JS文件
    <script src="MicrosoftAjax.debug.js" type="text/javascript"></script>
    <script src="AjaxControlToolkit.Common.Common.js" type="text/javascript"></script>
    <script src="AjaxControlToolkit.ExtenderBase.BaseScripts.js" type="text/javascript"></script>
    <script src="AjaxControlToolkit.PopupExtender.PopupBehavior.js" type="text/javascript"></script>
    <script src="AjaxControlToolkit.HoverExtender.HoverBehavior.js" type="text/javascript"></script>
    <script src="AjaxControlToolkit.HoverMenu.HoverMenuBehavior.js" type="text/javascript"></script>

2、放置一个作为触发源的html元素
<input type="submit" name="btnRightShow" value="向右显示" id="btnRightShow" />

3、放置一个触发事件后动态显示的元素
<div id="tipRightPanel" class="tipRightPanel" style="width:80px;"></div>

4、在页面的尾部添加初始化脚本
    <script type="text/javascript">
    <!--
        Sys.Application.initialize();
        Sys.Application.add_init(function() {
            $create(AjaxControlToolkit.HoverMenuBehavior, {
                //"HoverCssClass":"popupHover",
                "OffsetY":-20,
                "PopDelay":50,
                "PopupPosition":4,
                "dynamicServicePath":"tipRight.htm",
                "id":"hme1",
                "popupElement":$get("tipRightPanel")
                },
                null, null, $get("btnRightShow"));
        });
    // -->
   
    </script>

附件解压密码为 ruiya

posted @ 2007-07-13 16:25  网际飞狐  阅读(688)  评论(0编辑  收藏  举报