jQuery 使用jquery弹出消息框

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13723475/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 12:53:56  来源:igfitidea点击:

popup message box using jquery

jqueryjquery-uipopup

提问by Nirmala

I am new to JQuery. I need to popup message box using JQuery. Please help how to do it or please provide me the link how can i obtain this.

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

I was using messi but i am unable get the required result.

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

<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>

回答by Sampath

You can easily done it byusing jQuery Ui.

您可以使用jQuery Ui轻松完成

HTML

HTML

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

You need to initialize the Dialog

您需要初始化对话框

$(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;
  });
});

Great Links for Dialog popupsLink 1Another one Link 2

对话框弹出窗口的重要链接链接 1另一个链接 2

I got this from Here

我从这里得到这个

Hope this will help.Good luck.

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

回答by mrbengi

I had the same issue, and solved by using Ajax Control Toolkitto popup messagebox.

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

And you can find an example here for ModelPopupExtender: http://jamestsai.net/Blog/post/How-to-use-ASPNET-AJAX-UpdatePanel-in-ModalPopup.aspxYou can customize this. And can also popup the message box by codebehind manually.

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

Regards, Bengi.

问候,本吉。