87,910
社区成员
发帖
与我相关
我的任务
分享
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="keywords" content="jquery,ui,easy,easyui,web"/>
<meta name="description" content="easyui help you build your web page easily!"/>
<link rel="stylesheet" type="text/css" href="http://www.w3cschool.cc/try/jeasyui/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="http://www.w3cschool.cc/try/jeasyui/themes/icon.css"/>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="http://www.w3cschool.cc/try/jeasyui/jquery.easyui.min.js"></script>
function myfun(txt, url) {
if ($('#tabs').tabs('exists', txt)) {
$('#tabs').tabs('select', txt);
} else {
var content = '<iframe scrolling="auto" frameborder="0" src="' + url + '" style="width:100%;height:100%;"></iframe>';
$('#tabs').tabs('add', {
title: txt,
content: content,
closable: true
});
}
}
</script>
protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
{
string txt = TreeView1.SelectedNode.Text.ToString();
string url = TreeView1.SelectedValue.ToString();
ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script type='text/javascript'>myfun('"+txt+"','"+url+"');</script>");
}