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

查看:102
本文介绍了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:wwwmy-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:wwwmy-file. When accessing http://localhost/my-file .. worked great.

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

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