2

当我查看"被替换为". 我的页面如下所示:

$(document).ready(function() {
    $("input[name$='case']").click(function() {
        var test = $(this).val();

        if(test == "daglig"){

            $("div.desc").hide();
            $("#daglig_div").show();

        }else if(test == "veckovis"){

            $("div.desc").hide();
            $("#veckovis_div").show();

        }else if(test == "manadsvis"){

            $("div.desc").hide();
            $("#manadsvis_div").show();

        }
    });
});

当我部署页面时,结果是这样的:

$(document).ready(function() {
    $("input[name$='case']").click(function() {
        var test = $(this).val();

        if(test == "daglig"){

            $("div.desc").hide();
            $("#daglig_div").show();

        }else if(test == "veckovis"){

            $("div.desc").hide();
            $("#veckovis_div").show();

        }else if(test == "manadsvis"){

            $("div.desc").hide();
            $("#manadsvis_div").show();

        }
    });
});​

只有页面的这一部分得到了这种奇怪的转换。我尝试过使用不同的编码、字符集、复制页面上没有被替换为"、替换"为的其他引号,但"我仍然得到相同的错误。有人可以帮我解决这个问题吗?

在此先感谢,克莱德蛙

4

1 回答 1

0

I "rewrote" the function again myself and it's working now. Apparently the old text had different charsets then my new text i wrote. Very strange bacause i converted the old text to "UTF-8" with notepad++, but obviously it didn't work... thanks anyway to everyone who took the time :)

于 2012-09-20T12:18:17.030 回答