0
我有一個按鈕,當點擊按鈕時,背景應該變暗並彈出模態。在jQuery中彈出對話框後暗淡的背景
我在C#中非常新,到目前爲止,我已經走到這一步:
<html>
<head>
<title>Create new user/Edit user</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="http://code.jquery.com/ui/1.8.24/jquery-ui.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/themes/smoothness/jquery-ui.css" type="text/css" media="all" />
</head>
<body>
<h4>User Management Module</h4>
<button id="opener">New User</button>
<div id="wrapper">
<p><asp:Label id="lbl1" runat="server" /></p>
<p>Username</p>
<form id="Form1" runat="server">
<asp:TextBox runat="server" id="TextBox1"/>
<p>Password</p>
<asp:TextBox runat="server" id="TextBox2"/>
<p>E-mail</p>
<asp:TextBox runat="server" id="TextBox3"/>
</form>
</div>
<p></p>
<button id="Button.edit">Edit User</button>
<div id="Div1"></div>
<script type="text/javascript">
$(document).ready(function() {
$('#wrapper').dialog({
autoOpen: false,
title: 'Create new user'
});
$('#opener').click(function() {
$('#wrapper').dialog('open');
// $('h4').fadeOut();
// return false;
});
});
</script>
</body>
</html>
首先我必須使用:
$('h4').fadeOut();
但是,這是一樣的東西有助於消除或隱藏。我沒有實現覆蓋。謝謝。
請問你能證明一下嗎?因爲它不起作用。 – Umitk
你確實需要關注鏈接。該頁面上有許多演示和代碼示例。 – gfish3000