[英]How to create popup using jquery
I want to create dialog using jQuery, which can create like and object in java. 我想使用jQuery创建对话框,它可以在Java中创建喜欢和对象。
var popupObject = $.popup({option1:'dd', option2: 'ccc'});
Then I can control popup like this: 然后,我可以像这样控制弹出窗口:
popupObject.show();
popupObject.hide();
I need this coding style for apply to JSF controlling. 我需要这种编码样式才能应用于JSF控制。
How can I coding in jQuery? 如何在jQuery中编码?
Please help me, I search for long time. 请帮我,我找了很久。
You can try jQuery UI dialog . 您可以尝试jQuery UI对话框 。
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery UI Dialog - Default functionality</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script src="/resources/demos/external/jquery.bgiframe-2.1.2.js"></script>
<script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<script>
$(function() {
$( "#dialog" ).dialog();
});
</script>
</head>
<body>
<div id="dialog" title="Basic dialog">
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>
</body>
</html>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.