溫馨提示×

溫馨提示×

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

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

2,簡單交互對話框

發布時間:2020-08-01 19:29:17 來源:網絡 閱讀:661 作者:1473348968 欄目:編程語言

2,簡單交互對話框

-----后臺

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

2,簡單交互對話框

----dome2

2,簡單交互對話框

----dome3

2,簡單交互對話框

----dome4

2,簡單交互對話框

----服務器按鈕

2,簡單交互對話框

 

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

 

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女