我的HTML文档有Bootstrap,但Bootstrap不会检测jQuery。这是我的<head>
标记:
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.slim.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.js"></script>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.js" type="application/javascript"></script>
</head>
但它给了我这个错误:
Uncaught Error: Bootstrap JavaScriopt requires jQuery
答案 0 :(得分:1)
使用这3个脚本标签中的一个,最好是第二个。
if object_id('tempdb..#tmptbl') is not null drop table #tmptbl
create table #tmptbl (cnt int not null)
declare @colqry varchar(800)
declare mycursor cursor for
select 'insert into #tmptbl (cnt) select count(*) cnt from ' + object_name(object_id) + ' where ' + name + ' like ''%e%'''
from sys.columns
where object_id = object_id('YourTableName')
open mycursor
fetch next from mycursor into @colqry
while @@fetch_status = 0
begin
print @colqry
exec (@colqry)
fetch next from mycursor into @colqry
end
close mycursor
deallocate mycursor
select sum(cnt) from #tmptbl
答案 1 :(得分:0)
如果出于某种原因加载了两个版本的jQuery(不建议这样做),从第二个版本调用$ .noConflict(true)将返回全局范围的jQuery变量到第一个版本的变量。
使用jQuery.noConflict,您可以在同一页面上使多个版本的jQuery共存。例如
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.slim.js"></script>
<script>
var jq1 = jQuery.noConflict();
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.js"></script>
<script>
var jq2= jQuery.noConflict();
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.js"></script>
<script>
var jq3 = jQuery.noConflict();
</script>
但如上所述,只使用一个版本的jquery。