当前位置: 代码迷 >> Java Web开发 >> 求解 CSDN 上哪里有js技术,寻求帮忙,该怎么解决
  详细解决方案

求解 CSDN 上哪里有js技术,寻求帮忙,该怎么解决

热度:626   发布时间:2016-04-17 16:05:54.0
求解 CSDN 上哪里有js技术,寻求帮忙
我要用JS   做一个树菜单,和CSDN(http://community.csdn.net/)左边那里树菜单一样,无法有右键,不能看原代码,安全性能高的。主要速度快

------解决方案--------------------
copy csdn的就行了啊。

屏蔽鼠标右键,谷歌上很多
------解决方案--------------------
google it: javascript 屏蔽右键
google it: Javascript menutree
------解决方案--------------------
<script language= "javascript " src= "/tree/mztreeview10.js "> </script>
<script language= "javascript " src= "/tree/TreeNodeData/begin.js "> </script>
<script language= "javascript " ">
<!--
function dodo()
{
ExpandNode( '1_9009 ');
ExpandNode( '9009_53 ');
}

function ExpandNode(iid)
{
if( document.body.readyState != "complete " )
{
setTimeout( "ExpandNode( ' "+iid+ " ') ",2);
return;
}
var i = 0;
if(tree.nodes[iid])
{
i = tree.nodes[iid];
if(i > 0)
{
tree.expand(i,true);
tree.focus(i);
}
}
else
{
setTimeout( "ExpandNode( ' "+iid+ " ') ",10);
return;
}
}
//-->
</script>
<title> CSDN树型菜单测试 </title>
<style>
A:LINK, A:VISITED, A:ACTIVE, A:HOVER
{
color: #000000;
font-size: 13px;
padding-left: 3px;
TEXT-DECORATION: NONE;
font-family: Tahoma,Verdana,宋体,Fixedsys;
}
SPAN
{
font-family: Tahoma,Verdana,宋体,Fixedsys;
}


</style>
</head>
<body text= "#000000 " vlink= "#5493b4 " link= "#003fb7 " bgcolor= "#e5e5e5 ">
<div id= "treeviewarea ">
</div>

<script language= "javascript ">
<!--
var tree = new MzTreeView( "tree ");
tree.setIconPath( "/Tree/TreeImages/ ");
tree.url = "/Expert/ForumList.asp?typenum=1 ";
tree.target = "ContentFrame ";
tree.nodeFilePath = "/Tree/TreeNodeData/ ";
InitShowTreeInfo(tree);
document.getElementById( 'treeviewarea ').innerHTML = tree.toString();
//-->
</script>

</body>
------解决方案--------------------
mztree
梅花雪树
------解决方案--------------------
ytzhsh(醉天涯)已经给了源码了。。。
这段代码可以屏蔽右键,防复制等:
<body marginwidth= "0 " marginheight= "0 " oncontextmenu= "return false " ondragstart= "return

false " onselectstart = "return false " onselect= "document.selection.empty() "

oncopy= "document.selection.empty() " onbeforecopy= "return false "

onmouseup= "document.selection.empty() ">
<noscript> <iframe src=*> </iframe> </noscript>
  相关解决方案