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
popup message box using jquery
提问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
I got this from Here
我从这里得到这个
Hope this will help.Good luck.
希望这会有所帮助。祝你好运。
回答by mrbengi
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.aspxYou can customize this. And can also popup the message box by codebehind manually.
你可以在这里找到一个例子ModelPopupExtender
:
http://jamestsai.net/Blog/post/How-to-use-ASPNET-AJAX-UpdatePanel-in-ModalPopup.aspx你可以自定义它。也可以通过codebehind手动弹出消息框。
Regards, Bengi.
问候,本吉。