溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

1,右下角滑動通知

發(fā)布時間:2020-06-20 09:19:13 來源:網(wǎng)絡(luò) 閱讀:688 作者:1473348968 欄目:編程語言

1,右下角滑動通知


------后臺

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;



public partial class _1_右下角滑動通知_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }



    public string GetDialog()
    {
        return setRightDialog("通知",
            250,
            "<a ,
            "face-sad");
    }


    /// <summary>
    /// 右下角滑動通知
    /// </summary>
    /// <param name="title">彈出框標(biāo)題</param>
    /// <param name="width">寬度</param>
    /// <param name="content">內(nèi)容(可以加上標(biāo)簽)</param>
    /// <param name="icon">圖標(biāo)(如下,選擇一個圖標(biāo)的名稱)</param>
    /// <returns></returns>
    private string setRightDialog(string title, int width, string content, string icon)
    {
        StringBuilder sb = new StringBuilder();
        sb.Append("<script type=\"text/javascript\">");
        sb.Append(" $(function () { ");
        sb.Append(" art.dialog.notice({ ");
        sb.AppendFormat("title: \"{0}\",", title);
        sb.AppendFormat("width:{0},", width.ToString());
        sb.AppendFormat("content:\"{0}\",", content);
        sb.AppendFormat("icon:\"{0}\",", icon);
        sb.AppendFormat("time:{0}", "5");
        sb.Append(" }); ");
        sb.Append(" }); ");
        sb.Append("</script>");
        return sb.ToString();
    }
}


------前臺

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_1_右下角滑動通知_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style>
        body { font-size:75%; color:#666; font-family:'Microsoft Yahei', Tahoma, Arial!important; font-family:'宋體', Tahoma, Arial;}
    </style>

    <script src="../artDialog/artDialog.js?skin=default"></script>
    <script src="../artDialog/plugins/iframeTools.js"></script>
    <script src="../artDialog/ZD.artDialog.js" type="text/javascript"></script>


   <%-- <script type="text/javascript">
        $(function () {
            art.dialog.notice({
                title: '萬象網(wǎng)管',
                width: 220, // 必須指定一個像素寬度值或者百分比,否則瀏覽器窗口改變可能導(dǎo)致artDialog收縮
                content: "<a ,
                icon: 'face-sad',
                time: 5
            });
        });
    </script>--%>

</head>


<body>
    <form id="form1" runat="server">
    
    <!----------前臺調(diào)用-------------->
    <%=GetDialog() %>
    <!----------前臺調(diào)用-------------->


    </form>
</body>
</html>


1,右下角滑動通知



源代碼下載地址:http://down.51cto.com/data/1968050
技術(shù)學(xué)習(xí)群(發(fā)展中,群成員免費(fèi)提供資源。歡迎大家加入):426634651


向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI