0

我正在一个网站上工作,我正在尝试使用 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

4

1 回答 1

0

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

您可以尝试阻止浏览器缓存您的文件。这应该会有所帮助: 如何在所有浏览器中控制网页缓存?

于 2013-05-13T14:46:57.487 回答