Webserver不会覆盖文件

时间:2013-05-13 14:29:45

标签: jquery file webserver

我正在网站上工作,我正在尝试使用FilzZilla上传jQuery文件:

$(document).ready(function(){

function getParameter(paramName) {
    var searchString = window.location.search.substring(1),
        i, val, params = searchString.split("&");

    for (i=0;i<params.length;i++) {
        val = params[i].split("=");
        if (val[0] == paramName) {
            return unescape(val[1]);
        }

        if (searchString == '') {
        } else if (searchString == 'page=contact') {
            $('#contactknop').css("color", "#00aeef");
    $("#contactknop").mouseover(function(){$(this).css({"color":"#00aeef"})});
    $("#contactknop").mouseout(function(){$(this).css({"color":"#00aeef"})});
        } else if (searchString == 'page=visie-missie-en-doel') {
            $('#visie').css("color", "#00aeef");
        } else if (searchString == 'page=mederwerkers') {
            $('#medewerkers').css("color", "#00aeef");
        } else if (searchString == 'page=diciplines') {
            $('#disciplines').css("color", "#00aeef");
        } else if (searchString == 'page=slimmezorg') {
            $('#slimmezorg').css("color", "#00aeef");
        } else if (searchString == 'page=collectief') {
            $('#collectief').css("color", "#00aeef");
        } else if (searchString == 'page=lesrooster') {
            $('#lesrooster').css("color", "#00aeef");
        } else if (searchString == 'page=lidvanleef') {
            $('#lidvanleef').css("color", "#00aeef");
        } else if (searchString == 'page=algemenevoorwaarden') {
            $('#algemenevoorwaarden').css("color", "#00aeef");
        } else if (searchString == 'page=prijslijst') {
            $('#prijslijst').css("color", "#00aeef");
        } else if (searchString == 'page=vakorganisaties') {
            $('#vakorganisatie').css("color", "#00aeef");
        } else if (searchString == 'page=partners') {
            $('#partners').css("color", "#00aeef");
        }
    }
    return null;
}



$("#visie").mouseover(function(){$(this).css({"color":"#00aeef"})});
$("#visie").mouseout(function(){$(this).css({"color":"#000000"})});

$("#medewerkers").mouseover(function(){$(this).css({"color":"#00aeef"})});
$("#medewerkers").mouseout(function(){$(this).css({"color":"#000000"})});

$("#disciplines").mouseover(function(){$(this).css({"color":"#00aeef"})});
$("#disciplines").mouseout(function(){$(this).css({"color":"#000000"})});

$("#slimmezorg").mouseover(function(){$(this).css({"color":"#00aeef"})});
$("#slimmezorg").mouseout(function(){$(this).css({"color":"#000000"})});

$("#collectief").mouseover(function(){$(this).css({"color":"#00aeef"})});
$("#collectief").mouseout(function(){$(this).css({"color":"#000000"})});

$("#lesrooster").mouseover(function(){$(this).css({"color":"#00aeef"})});
$("#lesrooster").mouseout(function(){$(this).css({"color":"#000000"})});

$("#lidvanleef").mouseover(function(){$(this).css({"color":"#00aeef"})});
$("#lidvanleef").mouseout(function(){$(this).css({"color":"#000000"})});

$("#algemenevoorwaarden").mouseover(function(){$(this).css({"color":"#00aeef"})});
$("#algemenevoorwaarden").mouseout(function(){$(this).css({"color":"#000000"})});

$("#prijslijst").mouseover(function(){$(this).css({"color":"#00aeef"})});
$("#prijslijst").mouseout(function(){$(this).css({"color":"#000000"})});

$("#vakorganisatie").mouseover(function(){$(this).css({"color":"#00aeef"})});
$("#vakorganisatie").mouseout(function(){$(this).css({"color":"#000000"})});

$("#partners").mouseover(function(){$(this).css({"color":"#00aeef"})});
$("#partners").mouseout(function(){$(this).css({"color":"#000000"})});

$("#contactknop").mouseover(function(){$(this).css({"color":"#00aeef"})});
$("#contactknop").mouseout(function(){$(this).css({"color":"#000000"})});

getParameter();

});

但我的网站只输出旧文件。几天前我遇到了这个问题,我通过重命名文件并将所有内容链接在一起来解决它。

你可以在这里看到网站文件: site

1 个答案:

答案 0 :(得分:0)

听起来你的JavaScript文件正在被缓存。

您可以尝试阻止浏览器缓存您的文件。这应该有所帮助: How to control web page caching, across all browsers?