jQuery使用json的问题,第一次,不知道问题在哪

这是一个ajax.html页面,请求UserInfo.json中的内容,点击按钮没有响应。首先我确定jQuery已经可以正常使用。

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <title>ajax.html</title>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <script type="text/javascript" src="/test/js/jquery-1.4.3.js">
</script>
<style type="text/css">
    body{font-size:13px}
    .divFrame{width:260px;border:solid 1px #666}
    .divFrame .divTitle{padding:5px;background-color:#eee}
    .divFrame .divTitle .clsShow{font-size:14px}
    .btn {border:#666 1px solid;padding:2px;width:80px;
    }
</style>
<script type="text/javascript">

$(function(){
    $("#Button1").click(function(){

        $.getJSON("UserInfo.json",function(data){
        alert("ddddd");//测试用
            $("#divTip").empty();//先清空标记中的内容
                
            var strHTML="";//初始化保存内容变量
            //遍历获取的数据
            $.each(data,function(InfoIndex,Info){
                strHTML+="姓名:"+Info['name']+"<br/>";
                strHTML+="性别:"+Info['sex']+"<br/>";
                strHTML+="邮箱:"+Info['email']+"<br/>";       
            })
            $("#divTip").html(strHTML);//显示处理后的数据
        })
    })
});
</script>
    </head>

    <body>
        <div class="divFrame">
            <div class="divTitle">
                <input id="Button1" type="button" class="btn" value="获取数据"/>
                
            </div>
            <div class="divContent">
                <div id="divTip"></div>
            </div>
        </div>

    </body>
</html>

 

下面是UserInfo.json

 

[
    {
        "name" : "tom",
        "sex"  : "man",
        "email" : "abc@163.com"
    },  
    {
        "name" : "li",
        "sex"  : "woman",
        "email" : "adc@163.com"
    }
]

我试了一下你贴上去的代码,显示出了正常结果
[code="html"]
姓名:tom
性别:man
邮箱:abc@163.com
姓名:li
性别:woman
邮箱:adc@163.com
[/code]
你可以检查下是不是ajax.html文件编码的问题,或者浏览器问题,我用的浏览器IE6,firefox3.5.9

测试成功的文件,你可以下载看一下
[url]http://testcq.googlecode.com/files/tmp_jquery.zip[/url]

正在看JSON,期待niu人!