关于javascript:未捕获类型错误:无法在object.onload处读取未定义的”setattribute”属性

Uncaught TypeError: Cannot read property 'setAttribute' of undefined at Object.onLoad

知道是什么导致了这个错误吗?

我的列表包括:

1
2
3
4
5
6
7
8
<link rel="stylesheet" href="../../node_modules/semantic-ui/dist/semantic.min.css">
<link rel="stylesheet" href="../../node_modules/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="../../node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../../node_modules/fullcalendar/dist/fullcalendar.min.css">
<script src="../../node_modules/semantic-ui/dist/semantic.min.js">
<script src="../../node_modules/bootstrap/dist/js/bootstrap.bundle.min.js">
<script src="../../node_modules/moment/min/moment.min.js">
<script src="../../node_modules/fullcalendar/dist/fullcalendar.min.js">

HTML元素:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
    <i class="calendar icon">
    <span class="text">Choose a Month</span>
   
                January
                February
                March
                April
                May
                June
                July
                August
                September
                October
                November
                December

脚本:

1
$('#monthDrop').dropdown();

它在加载时呈现良好和所有内容,并且没有错误,仅当我尝试单击它时:

enter image description here


我们使用以下HTML遇到了相同的错误:

1
2
3
4
5
<select class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" role="button" v-model="selected" aria-haspopup="true" aria-expanded="false">
    <option disabled value="">Please select one</option>
    <option class="dropdown-item" value="type1">Carrier</option>
    <option class="dropdown-item" value="type2">Shipper</option>
</select>

我们试图从