2013-11-01 14:13:51 +08:00

44 lines
1.3 KiB
Plaintext

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="addtab.aspx.cs" Inherits="FineUI.Examples.other.addtab" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title></title>
<link href="../css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<x:PageManager ID="PageManager1" runat="server" />
<x:Button ID="Button1" runat="server" EnablePostBack="false" OnClientClick="openHelloFineUI();"
Text="向父页面添加选项卡">
</x:Button>
<br />
<x:Button ID="Button2" runat="server" EnablePostBack="false" OnClientClick="closeActiveTab();"
Text="关闭当前选项卡">
</x:Button>
</form>
<script type="text/javascript">
var basePath = '<%= ResolveUrl("~/") %>';
function openHelloFineUI() {
/*
var node = {
attributes: {
href: "/basic/hello.aspx"
},
text: "你好 FineUI",
id: "hello_fineui_example"
};
*/
parent.addExampleTab.apply(null, ['hello_fineui_example', basePath + 'basic/hello.aspx', '你好 FineUI', basePath + 'images/filetype/vs_aspx.png', true]);
}
function closeActiveTab() {
parent.removeActiveTab();
}
</script>
</body>
</html>