<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<script type="text/javascript" src="jquery-1.4.2.js"></script>
<script type="text/javascript" src="location.js"></script>
<script type="text/javascript" src="YlChinaArea.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".ChinaArea").jChinaArea({
aspnet:true,
s1:"河南省",//默认选中的省名
s2:"安阳市",//默认选中的市名
s3:"文峰区"//默认选中的县区名
})
})
</script>
</head><body ><p> <div class="ChinaArea">
<select id="province" name="province" style="width: 100px;"></select>
<select id="city" name="city" style="width: 100px;"></select>
<select id="county" name="county" style="width: 120px;"> </select>
</div></p>
</body>
</html>
我的页面内容
单独打开次html的话 可以正常显示数据
但是 当部署到tomcat上后 在通过地址调用的时候 就爆出 对象不支持次属性和方法 $(".ChinaArea").jChinaArea({
就是这一行 真的很纳闷
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<script type="text/javascript" src="jquery-1.4.2.js"></script>
<script type="text/javascript" src="location.js"></script>
<script type="text/javascript" src="YlChinaArea.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".ChinaArea").jChinaArea({
aspnet:true,
s1:"河南省",//默认选中的省名
s2:"安阳市",//默认选中的市名
s3:"文峰区"//默认选中的县区名
})
})
</script>
</head><body ><p> <div class="ChinaArea">
<select id="province" name="province" style="width: 100px;"></select>
<select id="city" name="city" style="width: 100px;"></select>
<select id="county" name="county" style="width: 120px;"> </select>
</div></p>
</body>
</html>
我的页面内容
单独打开次html的话 可以正常显示数据
但是 当部署到tomcat上后 在通过地址调用的时候 就爆出 对象不支持次属性和方法 $(".ChinaArea").jChinaArea({
就是这一行 真的很纳闷
<script type="text/javascript" src="location.js"></script>
<script type="text/javascript" src="YlChinaArea.js"></script>路径不对,用火狐debug看一下就知道了
是不是有点夸张?要不你再把详细的贴出来
(?)()a.html (第 17 行)
ready(wait=undefined)jquery-1.4.4.js (第 447 行)
DOMContentLoaded()jquery-1.4.4.js (第 875 行)
[在此错误处中断] s3:"文峰区"//默认选中的县区名 ff的错误提醒
不用firebug也能调试,按 ctrl+shitf+j
src的文件路径错了
哥们 要是路径错了 就不会报 jquery.JS里面的错误了 路径没问题
alert()看看