📄 demo_helloworld.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>SkyTree v2.0 Demo - Hello,world!</title>
<link href="Demo.css" rel="stylesheet" type="text/css" />
<link href="../Theme/Default/Tree.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="../Script/SkyTree.js"></script>
</head>
<body>
<h3>Skytree v2.0 Demo</h3>
<h4>Hello,world!</h4>
<div class="Note">'Hello,world' again, this demo show you the basic structure of a skytree and teach you how to create a tree by triditional programming, but usually I don't like to do so, because I get some better ways to go. However, let's take this tour first. </div>
<div id="Demo"></div>
<input id="showCode" name="showCode" type="checkbox" onclick="with(document.getElementById('Code')){style.display=this.checked?'':'none';}"><label for="showCode">Click here to view code for the tree above.</label>
<div id="Code" style="display:none;"><pre><img src="Images/Code_HelloWorld.gif" /></pre></div>
<script language="javascript" type="text/javascript">
ST_DEFAULT_BASE_PATH = '../';
var objTree = new SkyTree('objTree','Demo'); //Declare and create a skytree object.
var aNode; //Declare a skytree node for using.
objTree.readOnly = true;
objTree.allowContextMenu = false;
objTree.initialize(); // initialize the object
aNode = objTree.createNode(0); //create a root node;
aNode.setText('Hello,world!'); //set node text
aNode = objTree.createNode(aNode.index); //create a sub node based on root node;
aNode.setText('Welcome to JustRun.');
aNode = objTree.createNode(aNode.parent.index); //create a sibling node;
aNode.setText('Enjoy yourself.');
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -