zoukankan      html  css  js  c++  java
  • jQuery powerFloat万能浮动层下拉层插件

    插件来源:http://www.zhangxinxu.com/wordpress/?p=1328

    浮动层功能很强大,用它加ajax实现了鼠标移进数据列表中的数据项时显示每项的详细内容。



    test.aspx页面:


    <script type="text/javascript">
            $(function () {         
                $(".markSelectBox").powerFloat({
                    400,
                    offsets: { x: -150, y: 0 },
                    eventType: "hover",
                    target: "#qmpanel_shadow"
                });    
            });
            function GetDetail(id) {         
                jQuery.post("/ajax/GetMsgDetail.ashx", { id: id },
                       function (data, textStatus) {
                           $("#qmpanel_shadow").html(data);
                       });
            }
    </script>



    <a href="javascript:void(0)" class="markSelectBox" onmouseover='javascript:GetDetail(<%# Eval("Id")%>)' style="cursor: pointer;">
        <%# Eval("MSubject") %>
    </a>



    <div style="position: absolute;background: #fff;border: 1px solid #aaa; display: none" id="qmpanel_shadow">
          加载中。。。
    </div>



    GetMsgDetail.ashx
    页面:


     public void ProcessRequest(HttpContext context)
            {
                context.Response.ContentType = "text/plain";

                if (!string.IsNullOrEmpty(context.Request.Params["id"]))
                {
                    int id = Convert.ToInt32(context.Request.Params["id"]);
                    Message m = IOC.R<IMessage>().Get(id);
                       context.Response.Write(m.MContent);             
                }           
            }

    效果:


  • 相关阅读:
    时间等待太重要!!!
    (引用 )自动化测试报告HTMLtestrunner
    (转载)selenium-webdriver(python)
    lr_convert_string_encoding()转码函数
    分步骤学习自动化测试
    (引用)web安全测试
    Monkey测试
    (学习网址)Python 自动化测试
    (引用) unittest测试驱动之执行测试(三)
    log4net日志组件
  • 原文地址:https://www.cnblogs.com/gdjlc/p/2086877.html
Copyright © 2011-2022 走看看