我正在寻找一些示例代码/控件,通过ASP.NET中的jQuery让我感觉像gbox一样的消息框.
您可以使用插件,但也可以在页面顶部放置固定的DIV并将其淡入/淡出.我们来看一个例子:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>jQuery</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$('input').click(function() {
$('#notification').fadeIn('slow');
});
});
</script>
</head>
<body style="height: 1000px;">
<div id="notification" style="position: fixed; top: 0px; margin-left: 50%; background-color: yellow; font-weight: bold; display: none;">Sending...</div>
<input type="button" value="Gmail notification!" />
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
你必须弄清楚如何隐藏它(操作完成后的回调等),样式等等.这只是一个例子.
| 归档时间: |
|
| 查看次数: |
20651 次 |
| 最近记录: |