您好,登錄后才能下訂單哦!
------后臺
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">彈出框標題</param> /// <param name="width">寬度</param> /// <param name="content">內容(可以加上標簽)</param> /// <param name="icon">圖標(如下,選擇一個圖標的名稱)</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: '萬象網管', width: 220, // 必須指定一個像素寬度值或者百分比,否則瀏覽器窗口改變可能導致artDialog收縮 content: "<a , icon: 'face-sad', time: 5 }); }); </script>--%> </head> <body> <form id="form1" runat="server"> <!----------前臺調用--------------> <%=GetDialog() %> <!----------前臺調用--------------> </form> </body> </html>
源代碼下載地址:http://down.51cto.com/data/1968050
技術學習群(發展中,群成員免費提供資源。歡迎大家加入):426634651
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。