日期:2014-05-16  浏览次数:20462 次

AJAX传值的问题,求各位进来帮忙看下
请教下:
我用ajax传纯文字到后台都没问题,但带HTML标签的就失败了,
直接不进行跳转,直接就报错提示
本地测试没有问题,放服务器上出现此问题
怎么解决呢?
  $.ajax({
                url: '../../ajax/Replies.ashx',
                type: 'post',
                data: { Floor: floor, Content: content, Code: code, Id: url },
                success: function (obj) {
                    if (obj == "CODERERROR") {
                        layer.alert("验证码错误!");
                        $('#imgCode').prop('src', '../../member/Image.aspx?k=' + new Date().getTime());
                        $('#txt_code').val();
                        return;
                    } else if (obj == "USERERROR") {
                        window.location.href = '/login.shtml';
                        return;
                    } else if (obj == "ERROR") {
                        layer.alert("对不起,回帖失败!");
                        $('#imgCode').prop('src', '../../member/Image.aspx?k=' + new Date().getTime());
                        $('#txt_code').val();
                        return;
                    }
                    else if (obj == "ERRORBBSID") {
                        layer.alert("请不要非法提交数据,非法帖子ID!");
                        $('#imgCode').prop('src', '../../member/Image.aspx?k=' + new Date().getTime());
     &