jQuery弹出显示问题 [英] Jquery PopUp Display Problem
本文介绍了jQuery弹出显示问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
朋友,
我在显示消息框时遇到问题,它会在单击按钮时显示,并在另一个按钮单击时隐藏,它会显示2-5秒钟,然后自动关闭消息框...
以下是我的代码,谁能告诉我代码中的错误.
Hi Friends,
I have a problem while displaying a message box,It will display on button click and hides on another button click, it display for 2-5 seconds and closes the message box automatically...
Below is my code, can anyone tell me what is the mistake in the code.
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Jquery PopUp Display</title>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#btnDisplay").click(function () {
$("#div1").dialog();
});
$("#btnHide").click(function () {
$("#div1").hide();
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:Button runat="server" ID="btnDisplay" Text="Display" />
<asp:Button runat="server" ID="btnHide" Text="Hide" />
<div title="Modal PopUp Display "id="div1" style="overflow:scroll; width:600px; height:300px ; display:none; " >
<asp:Panel ID="panel1" runat="server" Height="400px" Width="800px" BackColor="Black" BorderColor="Red"> </asp:Panel>
</div>
</form>
</body>
</html>
推荐答案
(document).ready(function(){
(document).ready(function () {
(#btnDisplay").click(function (){
("#btnDisplay").click(function () {
(#div1").dialog(); });
("#div1").dialog(); });
这篇关于jQuery弹出显示问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文