📄 main.html
字号:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> ASP.net|论坛 管理后台 - Discuz!NT - Powered by Discuz! NT</title>
<meta name="keywords" content="ASP.net,论坛" />
<meta name="description" content="Discuz!NT,论坛,asp.net" />
<link href="../styles/dntmanager.css" rel="stylesheet" type="text/css" />
<link href="../styles/nav.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/nav.js" type="text/javascript"></script>
<script>
var xmlContent="<div id='PARENT'><ul id='nav'><li><ul>";
//********************************************************************************
function createXMLDom(){
var xmldoc;
if (window.ActiveXObject)
xmldoc=new ActiveXObject("Microsoft.XMLDOM");
else
if (document.implementation&&document.implementation.createDocument)
xmldoc=document.implementation.createDocument("","doc",null);
xmldoc.async = false;
//为了和FireFox一至,这里不能改为False;
xmldoc.preserveWhiteSpace=true;
return xmldoc;
}
function createXMLHttp(){
var xmlHttp;
if (window.ActiveXObject){
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}else{
xmlHttp=new XMLHttpRequest();
}
return xmlHttp;
}
//**********************************************************************************************4-
function nbsp(pNum){
var tmpString=""
for(var i=0;i<pNum;i++){
tmpString+=" "//这里是全角的空格
}
return tmpString;
}
function getDOMAtt(pNode,pAttribute){
try{
return pNode.attributes.getNamedItem(pAttribute).nodeValue;
}catch(e){
//alert("指定节点不存在,或指定属性:"+pAttribute+" 不存在!")
return false;
}
}
//**************************************************************************************************
function attList(pNode){
if(pNode.nodeType == 4) return '';
var oAtt,tmpString="[ ";
try{
for(var i=0;oAtt=pNode.attributes[i];i++){
tmpString+=oAtt.nodeName+" = '" + oAtt.nodeValue+"' ";
}
tmpString+=" ]"
return tmpString;
}catch(e){ return ''}
}
function getNodeName(pNode){
if(pNode.nodeType == 4) return '';
return pNode.nodeName;
}
function getNodeValue(pNode){
try{
return pNode.firstChild.nodeValue;
}catch(e){return ''}
}
function switchTree(pNode,pLevel){
var tNode,i;
for(i=0;tNode=pNode.childNodes[i];i++){
if(tNode.nodeType==3) continue;//因为preserveWhiteSpace等于true
///xmlContent+=nbsp(pLevel)+"<font color='blue'><b>"+getNodeName(tNode)+"</b></font><font color='red'>"+attList(tNode)+"</font>"+getNodeValue(tNode)+"<br />";
if(getNodeName(tNode)=="Item")
{
xmlContent+="</ul></li>";
xmlContent+="<li><a href='#Menu=ChildMenu"+i+"' onclick='DoMenu(\"ChildMenu"+i+"\")'>"+attList(tNode).split('\'')[1]+"</a>";
xmlContent+="<ul id='ChildMenu"+i+"' class='collapsed'>";
}
else
{
xmlContent+="<li><a href='javascript:void(0);' onclick=\"javascript:document.getElementById('maintext').src='"+getNodeValue(tNode)+"';\">"+getNodeName(tNode)+"</a></li>";
}
switchTree(tNode,pLevel+1);
}
}
//-------------------------------------------------------------------------------
function nodeFirstCyc(path)
{
var xmlFile=path;
//加载XML文件。
var xmlDom=createXMLDom();
try{
xmlDom.load(xmlFile);
}catch(e){
var xmlHttp=createXMLHttp();
xmlHttp.onreadystatechange = function(){
if(xmlHttp.readyState == 4){
xmlDom=xmlHttp.responseXML;
}else{
window.state="XML文件加载中...";
}
}
xmlHttp.open("GET",xmlFile,false);
xmlHttp.send(null);
}
var DOMRoot=xmlDom.documentElement;
//取出指定节点的属性。
switchTree(DOMRoot,2);
return xmlContent+"</ul></li></div>";
}</script>
<STYLE type="text/css">
body {margin:0;}
</STYLE>
</head>
<script>
function $() {
var elements = new Array();
for (var i = 0; i < arguments.length; i++) {
var element = arguments[i];
try
{
if (typeof element == 'string')
element = document.getElementById(element) || document.all(element) || document.forms(0).all(element);
}
catch(ex)
{
element = null;
}
if (arguments.length == 1)
return element;
elements.push(element);
}
return elements;
}
function getQuery(name)
{
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r!=null) return unescape(r[2]); return null;
}
function setshorcutmenu(setoption)
{
$('shorcutmenu').style.display=setoption;
}
function Search(searchinfo,searchtype)
{
alert(searchinfo+searchtype);
}
function setseachmenu(setoption)
{
$('searchoption').style.display=setoption;
}
</script>
<script>
var toptabmenuid = getQuery("toptabmenuid");
if(toptabmenuid!="")
{
document.write("<BODY class=\"NtTab"+(toptabmenuid%7)+"\" >");
}
else
{
document.write("<BODY class=\"NtTab1\">");
}
</script>
<div class="NavBody" >
<div id="ManagerBodyMenu">
</div>
<!--显示快捷菜单-->
<div id="shorcutmenu" class="DropWindow" style="position:absolute; display:none; top:0px; left:0px;" onmouseout="setshorcutmenu('none')" onmouseover="setshorcutmenu('block')">
<dl>
<dt><a href="javascript:void(0);" onclick="javascript:top.location.href='';" onfocus="this.blur();">返回前台</a></dt>
<dd><a href="javascript:void(0);" onclick="javascript:document.getElementById('main').src='';" onfocus="this.blur();" >常用操作</a></dd>
<dd><a href="javascript:void(0);" onclick="javascript:document.getElementById('main').src='';" onfocus="this.blur();" >系统信息</a></dd>
<dd><a href="javascript:void(0);" onclick="javascript:document.getElementById('main').src='';" onfocus="this.blur();" >快速设置向导</a></dd>
<dd><a href="javascript:void(0);" onclick="javascript:document.getElementById('main').src='';" onfocus="this.blur();" >管理快捷菜单</a></dd>
<dd><a href="javascript:void(0);" onclick="javascript:top.location.href='../logout.aspx';" onfocus="this.blur();" >退出</a></dd>
</dl>
</div>
<!--显示搜索类型-->
<div id="searchoption" class="popupmenu-new" style="position:absolute; display:none; top:-8px; right:134px;width:70px;" onmouseover="setseachmenu('block')" onmouseout="setseachmenu('none')">
<div id="popupmenuitemlast" class="popupmenu-item-last">
<div> <a href="javascript:void(0);" onclick="javascript:top.topFrame.setseachtype('function');setseachmenu('none');" onfocus="this.blur();">功能</a></div>
<div> <a href="javascript:void(0);" onclick="javascript:top.topFrame.setseachtype('user');setseachmenu('none');" onfocus="this.blur();" >用户</a></div>
<div> <a href="javascript:void(0);" onclick="javascript:top.topFrame.setseachtype('test');setseachmenu('none');" onfocus="this.blur();" >测试</a></div>
</div>
</div>
<!--显示框架-->
<div class="InnerBody">
<iframe id="maintext" name="maintext" frameborder="0" scrolling="auto" src="tt.html" width="100%" height="600px"></iframe>
</div>
</div>
</body>
</html>
<script>
document.getElementById('ManagerBodyMenu').innerHTML=nodeFirstCyc("../js/menu.xml");
if(getQuery("defaulturl")!=null)
document.getElementById('maintext').src=getQuery("defaulturl")+'?showmenuid='+getQuery("showmenuid");
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -