Selectize.js无效

时间:2016-05-20 09:16:29

标签: javascript selectize.js

我试图将selectize.js集成到我的项目上我尝试了一个与我的项目无关的例子,但不知何故它没有用。我的控制台上没有任何错误,我错过了什么?

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>teste</title>
    <link rel="stylesheet" type="text/css" href="selectize.css" />
</head>
<body>
   <select id = "input-tags">
       <option value = "1">Carro</option>
       <option value = "2">Moto</option>
   </select>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
    <script type="text/javascript" src="selectize.js"></script>
    <sctipt src="teste.js"></script>
</body>

</html>

的javascript

 $(document).ready(function () {
 $('select').selectize({
    delimiter: ',',
    persist: false,
    create: function(input) {
        return {
            value: input,
            text: input
        }
    }
});
    });

1 个答案:

答案 0 :(得分:2)

你有一个错字: <sctipt src="teste.js"...而非。{ <script src="teste.js"...