您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
-----后台
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class _2_简单交互对话框_Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { ShowDialog("删除成功"); } /// <summary> /// 弹出模式1(服务端按钮) /// </summary> /// <param name="msg">弹出的内容(必填)</param> /// <param name="asyn">true则为ajax模式(选填)</param> /// <param name="key">key值(选填)</param> public void ShowDialog(string msg,string icon="", bool asyn = false, string key = "") { string dialog = string.Format("art.dialog.alert('{0}','{1}')", msg, icon); if (!asyn) ClientScript.RegisterStartupScript(this.GetType(), key, dialog, true); else ScriptManager.RegisterClientScriptBlock(this.Page, typeof(string), key, dialog, true); } }
-----前台
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_2_简单交互对话框_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/jquery-1.4.2.min.js" type="text/javascript"></script> <script src="../artDialog/artDialog.js?skin=default"></script> <script src="../artDialog/ZD.artDialog.js" type="text/javascript"></script> <script src="../artDialog/plugins/iframeTools.source.js" type="text/javascript"></script> <script type="text/javascript"> function dome1() { art.dialog.alert('人品越来越不那么稳定了,请检查!', "warning"); } function dome2() { art.dialog.confirm('你确定要删除这掉消息吗?', function () { art.dialog.tips('执行确定操作'); }, function () { art.dialog.tips('执行取消操作'); }, "succeed"); } function dome3() { art.dialog.prompt('请输入图片网址', function (val) { art.dialog.tips(val); }, 'http://'); } function dome4() { art.dialog.tips('数据正在提交..', 2); art.dialog.tips('成功!已经保存在服务器'); } </script> </head> <body> <form id="form1" runat="server"> <input type="button" value="案例1" onclick="dome1()" /> <input type="button" value="案例2" onclick="dome2()" /> <input type="button" value="案例3" onclick="dome3()" /> <input type="button" value="案例4" onclick="dome4()" /> <br /> <asp:Button ID="Button1" runat="server" Text="服务端按钮" OnClick="Button1_Click" /> </form> </body> </html>
----dome1
----dome2
----dome3
----dome4
----服务器按钮
源代码下载地址:http://down.51cto.com/data/1968050
技术学习群(发展中,群成员免费提供资源。欢迎大家加入):426634651
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。