jquery写的,为什么加载完页面后,没有弹出“1”?

    <script type="text/javascript">
            var data = '<%=data%>';
            $(function(){
            alert(1)
            getNoticeDetail();
            
            })
            function getNoticeDetail(){
                $.ajax({
                type : "post",
                url : "../RhNoticeAction.do",
                dataType : "json",
                timeout : 60000,
                async : false,
                data : {
                    
                },
                success : function(resp) {
                    if (resp.status == "0") {
                    } else {
                        alert("失败!")
                    }
                }
                });
            }
                
            
        
                </script>
阅读 1.9k
3 个回答
  1. 在测试页面按下 ctrl+shift+I
  2. 在出现的工作台里选择 console或者控制台标签
  3. 刷新当前页面
  4. 查看报错信息

先看看报错咯

可以的哦,你引入jquery了吗
clipboard.png

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题