日期:2014-05-17  浏览次数:20570 次

关于asp.net mvc运用jQuery的层次TreeView的问题
以下是我写的代码,不知道为什么在vs2008中没办法显示预期效果
C# code
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>

<!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 runat="server">
    <title>ViewPage1</title>
    <link href="../../Scripts/jquery-treeview/jquery.treeview.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../Scripts/jquery-treeview/jquery.treeview.js"></script>    
</head>
<body>
    <div>
    <ul id="browser" class="filetree treeview-famfamfam">
        <li>Folder 1
            <ul>
                <li><span class="folder">Item 1.1</span>
            

        <ul>
                        <li><span 

class="file">Item 1.1.1</span></li>
                    </ul>
            

    </li>
                <li><span class="folder">Folder 2</span>
        

            <ul>
                        <li><span 

class="folder">Subfolder 2.1</span>
                            

<ul id="folder21">
                                <li><span 

class="file">File 2.1.1</span></li>
                                

<li><span class="file">File 2.1.2</span></li>
                            

</ul>
                        </li>
                        

<li><span class="folder">Subfolder 2.2</span>
                            

<ul>
                                <li><span 

class="file">File 2.2.1</span></li>
                                

<li><span class="file">File 2.2.2</span></li>
                            

</ul>
                        </li>
                    

</ul>
                </li>
                <li class="closed"><span 

class="folder">Folder 3 (closed at start)</span>
                    

<ul>
                        <li><span class="file">File 

3.1</span></li>
                    </ul>
                </li>
        

        <li><span class="file">File 4</span></li>
            </ul>
        </li>
    </ul>
    </div>
</body>
</html>

有没有人能给个有源码的例子吗?

------解决方案--------------------
没引入jquery库