SCRIPT1014:字符无效 [英] SCRIPT1014: Invalid character

查看:545
本文介绍了SCRIPT1014:字符无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个脚本:

function slideSwitch() {
    var ae = jQuery('#featured-right a.active');
    if ( ae.length == 0 ) {
        ae = jQuery('#featured-right a:first');
        var i = jQuery('#featured-right a').index(ae);
        var bae = jQuery('#featured-left a.fb-'+i);
        bae.show();
    }

    var ne =  ae.next().length ? ae.next() : jQuery('#featured-right a:first');
}

$(document).ready(function(){
    var ae = jQuery('#featured-right a.active');
    if ( ae.length == 0 ) {
        ae = jQuery('#featured-right a:first');
        ae.addClass('active');
        var i = jQuery('#featured-right a').index(ae);
        jQuery('#featured-left a.fb-'+i).show();
        jQuery('#featured-right a:not(.active) span.key').hide();
    }
    setInterval("slideSwitch()", 1000);  
});

在任何浏览器上都可以使用IE浏览器。在IE上,IU得到

which works great on any browser but IE. On IE, IU get

SCRIPT1014: Invalid character featured.js, line 1 character 1

这里有什么问题?

推荐答案

IE似乎不喜欢我在没有HTTP服务器的情况下访问该页面的事实:)
我正在访问c:\\\ my-file。访问 http:// localhost / my-file 时效果很好。

It seems that IE didn't like the fact that i was accessing the page without a HTTP server :) I was accessing c:\www\my-file. When accessing http://localhost/my-file .. worked great.

这篇关于SCRIPT1014:字符无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆