我试图检查我的Jquery库是否加载到我的HTML页面上。我正在检查它是否有效,但有些不对。以下是我有:检查是否使用Javascript加载jquery
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="/query-1.6.3.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
if (jQuery) {
// jQuery is loaded
alert("Yeah!");
} else {
// jQuery is not loaded
alert("Doesn't Work");
}
});
</script>
不要在“$(document).Ready”中使用大写字母R' – Serigan
'alert(window。$?1:0)' – Thielicious