解决方案 »

  1.   


    晕 图片没有显示,就是点击一个按钮的时候:报没有权限的错误,昨天还没有,突然莫名奇妙的出现了这个问题!<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
    + request.getServerName() + ":" + request.getServerPort()
    + path + "/";
    %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <script language="JavaScript"
    src="<%=request.getContextPath()%>/js/MzTreeView10.js" charset="GBK"></script>
    <script language="JavaScript"
    src="<%=request.getContextPath()%>/js/popup_layer.js" charset="GBK"></script>
    <script language="JavaScript"
    src="<%=request.getContextPath()%>/js/jquery-1.3.2.js" charset="GBK"></script>
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
    </head>

    <body>
    <input type="button" value="显示" id="show" onclick="show()" />
    <input type="text" name="id" id="content" value="" />
    <div id="tree"></div> <table>
    <tbody id="tb"> </tbody>
    </table>
    <script type="text/javascript">
       // alert(tree.toString());
    function test(id){
    document.getElementById("content").value=id;
    }
    function show(){
    window.tree = new MzTreeView("tree");
       tree.icons["home"] = "user.gif";
        tree.icons["user"] = "user.gif";
        tree.icons["customer"]  = "customer.gif";
        tree.iconsExpand["book"] = "bookopen.gif"; //展开时对应的图片
        tree.setIconPath("<%=request.getContextPath() + "/images/"%>");
    tree.nodes['0_1'] = "text:MzTreeView;icon:customer;";
    tree.nodes['1_2'] = "text:节点一;icon:customer;method:test('2');";
    tree.nodes['2_3'] = "text:子节点;icon:customer;method:test('3');";
    var t = tree.toString();
    alert(t);
    var tbody = document.getElementById("tb");
    alert("a");
    var tr = tbody.insertRow(-1);
    alert("b");
    tr.setAttribute("id", '1');
    alert("c");
    var td1 = tr.insertCell(-1);
    alert("d");
    td1.innerHTML =t;
    }
    </script>
    </body>
    </html>