2个答案按时间排序按投票排序
-
采纳的答案
给你实装了代码
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Button</title>
- <link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-4.0.7-commercial/resources/css/ext-all.css"/>
- <script type="text/javascript" src="http://extjs.cachefly.net/ext-4.0.7-commercial/ext-all-debug.js"></script>
- </head>
- <body>
- <script type="text/javascript">
- Ext.create('Ext.Button', {
- text: 'Click me to open url',
- renderTo: Ext.getBody(),
- handler: function() {
- window.open('http://www.baidu.com', 'mywindow1', 'width=400, height=300, menubar=no, toolbar=no, scrollbars=yes');
- }
- });
- </script>
- </body>
- </html>
2012年6月13日 09:01
-
这个可以直接用javascript的原生方法的啊?window.open(url);
-

本文介绍如何使用 ExtJs 在点击按钮时打开新的浏览器窗口,并提供了一个完整的示例代码,包括 HTML 和 JavaScript 部分。

添加评论
关注(0)


被折叠的 条评论
为什么被折叠?



