zoukankan      html  css  js  c++  java
  • 鼠标移到datalist或者是grivdview上显示全部内容

    <script>
    $("td.TIP").mouseover(function (e) {
            this.myTitle = this.title;
            this.title = "";
            var toolTip = "<div id='tooltip'>" + this.myTitle + "</div>";
            $("body").append(toolTip);
            $("#tooltip").css({
                "position": "absolute",
                "padding": "5px",
                "background": "#F0F0E8",
                "border": "1px gray solid",
                "top": (e.pageY + y) + "px",
                "left": (e.pageX + x) + "px"
            }).show(200);
        }).mouseout(function () {
            this.title = this.myTitle;
            $("#tooltip").remove();
        }).mousemove(function (e) {
            $("#tooltip").css({
                "background": "#F0F0E8",
                "padding": "5px",
                "border": "1px gray solid",
                "top": (e.pageY + y) + "px",
                "left": (e.pageX + x) + "px"
            })
        })
    </script>


    <td class="TIP" title='<%#Eval("IntNewsContent")%>'><%# BaseClass.CheckStr(Eval("IntNewsContent"), 5)%></td>

    public static string CheckStr(object strValue, int Len) //字符串截取函数,如果长度大于30,则只显示前30个字符
        {
            return (strValue.ToString().Length > Len) ? strValue.ToString().Substring(0, Len) + ".." : strValue.ToString();
        }



  • 相关阅读:
    协议与接口相关
    jmeter 使用(1)
    jmeter 压力测试
    shell脚本的规则
    charles的原理及使用
    Linux环境部署和项目构建
    面向对象
    python 基础练习题
    jmeter 使用(2)
    Ext.apply
  • 原文地址:https://www.cnblogs.com/yanergui/p/5014313.html
Copyright © 2011-2022 走看看