【问题标题】:popup message box using jquery使用jquery弹出消息框
【发布时间】:2016-05-12 23:20:26
【问题描述】:

我是 JQuery 的新手。我需要使用JQuery 弹出消息框。请帮助如何做到这一点,或者请提供我如何获得此链接。

我正在使用 messi,但我无法获得所需的结果。

<html xmlns="http://www.w3.org/1999/xhtml">
  <head runat="server">
    <title></title>
    <link rel="stylesheet" href="files/messi.min.css" />
  </head>
  <body>
    <script src="files/messi.min.js">    
      new messi('This is a message with Messi.', { title: 'Title' });
    </script>
   <form id="form1" runat="server">
     <div>
       <asp:Button ID="Button1" runat="server" Text="click" />
     </div>
   </form>
  </body>
</html>

【问题讨论】:

标签: jquery jquery-ui popup


【解决方案1】:

您可以使用jQuery Ui轻松完成

HTML

 <a href="#" id="contactUs">Contact Us</a>                   
 <div id="dialog" title="Contact form">
   <p>appear now</p>
 </div>

您需要初始化对话框

$(function() {
  // this initializes the dialog (and uses some common options that I do)
  $("#dialog").dialog({autoOpen : false, modal : true, show : "blind", hide : "blind"});

  // next add the onclick handler
  $("#contactUs").click(function() {
    $("#dialog").dialog("open");
    return false;
  });
});

对话框弹出窗口的好链接 Link 1 另一个Link 2

我从Here得到这个

希望这会有所帮助。祝你好运。

【讨论】:

    【解决方案2】:

    我有同样的问题, 并通过使用Ajax Control Toolkit弹出消息框解决。

    您可以在这里找到ModelPopupExtender 的示例: http://jamestsai.net/Blog/post/How-to-use-ASPNET-AJAX-UpdatePanel-in-ModalPopup.aspx 你可以自定义这个。也可以手动通过codebehind弹出消息框。

    问候,本吉。

    【讨论】:

      猜你喜欢
      • 2011-10-28
      • 1970-01-01
      • 1970-01-01
      • 2017-05-29
      • 2023-03-21
      • 2021-11-26
      • 1970-01-01
      • 2019-12-02
      • 1970-01-01
      相关资源
      最近更新 更多