在jsp页面引入jquery尽然报错: $ is not defined,求教,急:
jsp页面就这么简单,只写了一个加载完页面就弹alert的,就告诉我$未定义:<head><basehref="<%=basePath%>"><title>MyJSP'i...
jsp页面就这么简单,只写了一个加载完页面就弹alert的,就告诉我$未定义:
<head> <base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> <script type="text/javascript" language="javascript" src="js/jquery.js"></script> </head> <script type="text/javascript"> $(document).ready(function(){ alert("123456565"); }); </script> 展开
<head> <base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> <script type="text/javascript" language="javascript" src="js/jquery.js"></script> </head> <script type="text/javascript"> $(document).ready(function(){ alert("123456565"); }); </script> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询