简体   繁体   English

弹出消息框使用jquery

[英]popup message box using jquery

I am new to JQuery . 我是JQuery新手。 I need to popup message box using JQuery . 我需要使用JQuery弹出消息框。 Please help how to do it or please provide me the link how can i obtain this. 请帮忙怎么做或者请给我链接如何获得这个。

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>

You can easily done it by using 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 您需要初始化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 popups Link 1 Another one Link 2 对话框弹出窗口 链接1链接1另一个链接2

I got this from Here 我从这里得到了这个

Hope this will help.Good luck. 希望这会有所帮助。祝你好运。

I had the same issue, and solved by using Ajax Control Toolkit to 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.aspx You can customize this. 你可以在这里找到ModelPopupExtender一个例子: httpModelPopupExtender你可以自定义它。 And can also popup the message box by codebehind manually. 并且还可以通过代码隐藏手动弹出消息框。

Regards, Bengi. 此致,Bengi。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM