2013-05-21 60 views
0

我想使用引导程序框架以及http://silviomoreto.github.io/bootstrap-select/。它只是没有用。以下是代码。请帮忙。扩展引导程序select

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Final_Year_Project_Allocation_System.silviomoreto_bootstrap_select_d4ec9bd.WebForm1" %> 

<!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></title> 

    <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script> 

    <link href="bootstrap-select.css" rel="stylesheet" type="text/css" /> 
    <link href="bootstrap-select.css" rel="stylesheet" type="text/css" />  

    <script src="../bootstrap/js/bootstrap.js" type="text/javascript"></script> 
    <script src="bootstrap-select.js" type="text/javascript"></script> 


</head> 
<body> 
    <form id="form1" runat="server" > 
    <div> 
    <select class="selectpicker"> 
<option>Mustard</option> 
<option>Ketchup</option> 
<option>Relish</option> 
</select> 
    </div> 
    </form> 

</body> 
</html> 

请大家帮忙。

+0

错误控制台是否报告任何错误?你可以验证所有的脚本正在加载? –

+0

你仍然有'bootstrap-select.css'两次(在你编辑之后)。 'bootstrap.css'仍然不存在。 –

回答

2

我没有看到对实际bootstrap.css的引用? 你需要有类似的信息(注意顺序 - 这一点很重要):

<link href="bootstrap.css" rel="stylesheet" type="text/css" /> 
<link href="bootstrap-select.css" rel="stylesheet" type="text/css" /> 

然后JS

<script src="../bootstrap/js/bootstrap.js" type="text/javascript"></script> 
<script src="../bootstrap/js/bootstrap-select.js" type="text/javascript"></script> 

确保路径是正确的,当然

编辑

我也敢肯定,boostrap.js拥有jQuery的依赖 - 所以一定要包括它,以及(的bootsrap.js)。

EDIT 2

我也怀疑你的路径是不正确的。如果这是你的JavaScript的路径:

"../bootstrap/js/bootstrap.js" 

那么最有可能为你的CSS路径将是(假设你刚刚落下引导原样,并没有将它放在不同的文件夹):

"../bootstrap/css/bootstrap.css"