|
@@ -1,112 +0,0 @@
|
|
-<!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>SimpleTree</title>
|
|
|
|
-<link rel="stylesheet" type="text/css" href="js/tree_themes/SimpleTree.css"/>
|
|
|
|
-<link rel="stylesheet" href="js/tree_themes/style.css" media="screen" type="text/css" />
|
|
|
|
-<script type="text/javascript" src="js/jquery-1.6.min.js"></script>
|
|
|
|
-<script type="text/javascript" src="js/SimpleTree.js"></script>
|
|
|
|
-<script type="text/javascript">
|
|
|
|
-$(function(){
|
|
|
|
- $(".st_tree").SimpleTree({
|
|
|
|
- click:function(a){
|
|
|
|
- if(!$(a).attr("hasChild"))
|
|
|
|
- alert($(a).attr("ref"));
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
-});
|
|
|
|
- window.onload = function () {
|
|
|
|
- var add = document.getElementById("add");
|
|
|
|
- add.onclick = function(){
|
|
|
|
- prompt("请添加课程:");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- var txt = document.getElementById("txt");
|
|
|
|
- txt.onfocus = function(){
|
|
|
|
- if (txt.value == "请输入关键字"){
|
|
|
|
- txt.value = "";
|
|
|
|
- txt.style.color = "#333";
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- txt.onblur = function () {
|
|
|
|
- if (txt.value == ""){
|
|
|
|
- txt.value = "请输入关键字";
|
|
|
|
- txt.style.color = "#ccc";
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- //获取图片
|
|
|
|
- var img = document.getElementsByTagName("img");
|
|
|
|
- //鼠标经过图片
|
|
|
|
- for(i=0;i<img.length;i++){
|
|
|
|
- img[i].index = i;
|
|
|
|
- img[1].onmouseover = function () {
|
|
|
|
- this.src = "js/tree_themes/imgs/" + 1 + ".gif";
|
|
|
|
- }
|
|
|
|
- img[2].onmouseover = function () {
|
|
|
|
- this.src = "js/tree_themes/imgs/" + 2 + ".gif";
|
|
|
|
- }
|
|
|
|
- img[3].onmouseover = function () {
|
|
|
|
- this.src = "js/tree_themes/imgs/" + 3 + ".gif";
|
|
|
|
- }
|
|
|
|
- //鼠标离开图片
|
|
|
|
- if(i!=0 && i!=4){
|
|
|
|
- img[i].onmouseout = function () {
|
|
|
|
- this.src = "js/tree_themes/imgs/0.png";
|
|
|
|
- }
|
|
|
|
- img[1].onclick = function(){
|
|
|
|
- prompt("请添加课程:");
|
|
|
|
- }
|
|
|
|
- img[2].onclick = function(){
|
|
|
|
- if(confirm("确实要删除吗?")){
|
|
|
|
- alert("已经删除!");
|
|
|
|
- }else {
|
|
|
|
- alert("已经取消了删除操作");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- img[3].onclick = function(){
|
|
|
|
- prompt("请编辑课程:","理科");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-</script>
|
|
|
|
-</head>
|
|
|
|
-<body>
|
|
|
|
-<div align="center">
|
|
|
|
- <img id="school" src="js/tree_themes/imgs/school.png">
|
|
|
|
-</div>
|
|
|
|
-<div id="box">
|
|
|
|
- <input type="text" name="search" value="请输入关键字" id="txt">
|
|
|
|
- <div id="add">添加学科</div>
|
|
|
|
- <div id="search">搜索</div>
|
|
|
|
-</div>
|
|
|
|
-<div id="all">
|
|
|
|
-<div class="img">
|
|
|
|
- <img id="img" src="js/tree_themes/imgs/0.png">
|
|
|
|
- <img id="img" src="js/tree_themes/imgs/0.png">
|
|
|
|
- <img id="img" src="js/tree_themes/imgs/0.png">
|
|
|
|
-</div>
|
|
|
|
-<div class="st_tree">
|
|
|
|
-<ul>
|
|
|
|
- <li><a href="#" ref="lk">理科</a></li>
|
|
|
|
- <ul show="true">
|
|
|
|
- <li><a href="#" ref="jsjykx">计算机与科学</a></li>
|
|
|
|
- <li><a href="#" ref="rjgc">软件工程</a></li>
|
|
|
|
- </ul>
|
|
|
|
- <li><a href="#" ref="wk">文科</a></li>
|
|
|
|
- <ul>
|
|
|
|
- <li><a href="#" ref="swyy">商务英语</a></li>
|
|
|
|
- <li><a href="#" ref="hyyx">汉语言学</a></li>
|
|
|
|
- <li><a href="#" ref="lsx">历史学</a></li>
|
|
|
|
- </ul>
|
|
|
|
-</ul>
|
|
|
|
-</div>
|
|
|
|
- <div id="photo">
|
|
|
|
- <img src="js/tree_themes/imgs/a.jpg" width="300px" height="300px">
|
|
|
|
- </div>
|
|
|
|
-</div>
|
|
|
|
-
|
|
|
|
-</body>
|
|
|
|
-</html>
|
|
|