更有好的文本框[同样可以用于其它情况]信息提示

1.样式引用(附带几种样式,根据实际情况引用)

    <%--信息提示代码样式--%>
    <link rel="stylesheet" href="~/Js/ToolTip/tip-yellow/tip-yellow.css" type="text/css" />
    <link rel="stylesheet" href="~/Js/ToolTip/tip-yellowsimple/tip-yellowsimple.css"
        type="text/css" />

2.由于应用了Jquery,所以引用Jquery。

        <script src="<%= ResolveUrl("~/Js/Jquery.js")%>" type="text/javascript"></script>

3.相关Js配置

复制代码
    <%--信息提示代码--%>
     <script src="<%= ResolveUrl("~/Js/ToolTip/jquery.poshytip.js")%>" type="text/javascript"></script>

<asp:TextBox ID="txtTip" runat="server" Width="150px" ToolTip="我是个性信息提示啦啦啦啦啦啦!"></asp:TextBox>
    <script type="text/javascript">
        //<![CDATA[
        $(function ()
        {
            $('#<%=txtTip.ClientID %>').poshytip(
            {
                className : 'tip-yellowsimple', showOn : 'focus', alignTo : 'target', alignX : 'right', alignY : 'center', 
                offsetX : 5 
            });
        });
        //]]>
</script>
复制代码

4.相关Js下载

下载

5.效果图:

posted @   爱智旮旯  阅读(511)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
点击右上角即可分享
微信分享提示