FLASH AS3.0出现错误1083: Syntax error: package is unexpected token.到底是为什麽啊?

flash as3.0 入门_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
flash as3.0 入门
上传于|0|0|文档简介
&&这个文档比较详细的说明了一些as3.0的编程技巧
阅读已结束,如果下载本文需要使用2下载券
想免费下载本文?
定制HR最喜欢的简历
下载文档到电脑,查找使用更方便
还剩43页未读,继续阅读
定制HR最喜欢的简历
你可能喜欢jquery - Error: Uncaught SyntaxError: Unexpected token & - Stack Overflow
Join the Stack Overflow Community
Stack Overflow is a community of 6.7 million programmers, just like you, helping each other.
J it only takes a minute:
For some reason, I'm getting this error message:
Uncaught SyntaxError: Unexpected token &
For this line of code:
title: '&img src="/images/text/text_mario_planet_jukebox.png" id="text_mario_planet_jukebox"/&',
In this context:
$(document).ready(function() {
$('#infobutton').click(function() {
$('#music_descrip').dialog('open');
$('#music_descrip').dialog({
title: '&img src="/images/text/text_mario_planet_jukebox.png" id="text_mario_planet_jukebox"/&',
autoOpen: false,
height: 375,
width: 500,
modal: true,
resizable: false,
buttons: {
'Without Music': function() {
$(this).dialog('close');
$.cookie('autoPlay', 'no', { expires: 365 * 10 });
'With Music': function() {
$(this).dialog('close');
$.cookie('autoPlay', 'yes', { expires: 365 * 10 });
I think everything should be good to go, but I don't understand why the & is somehow throwing this off..
whoops, forgot to show where this is happening! My bad,
Any ideas?
4,4232170106
This is a browser issue rather than a javascript or JQ it's attempting to interpret the angle bracket as an HTML tag.
Try doing this when setting up your javascripts:
//&![CDATA[
// insert teh codez
Alternatively, move your javascript to a separate file.
Edit: Ahh.. with that link I've tracked it down. What I said was the issue wasn't the issue at all. this is the issue, stripped from the website:
&script type="text/javascript"
$(document).ready(function() {
$('#infobutton').click(function() {
$('#music_descrip').dialog('open');
$('#music_descrip').dialog({
title: '&img src="/images/text/text_mario_planet_jukebox.png" id="text_mario_planet_jukebox"/&',
autoOpen: false,
height: 375,
width: 500,
modal: true,
resizable: false,
buttons: {
'Without Music': function() {
$(this).dialog('close');
$.cookie('autoPlay', 'no', { expires: 365 * 10 });
'With Music': function() {
$(this).dialog('close');
$.cookie('autoPlay', 'yes', { expires: 365 * 10 });
Can you spot the error? It's in the first line: the &script tag isn't closed. It should be
&script type="text/javascript"&
My previous suggestion still stands, however: you should enclose intra-tagged scripts in a CDATA block, or move them to a separately linked file.
That wasn't the issue here, but it would have shown the real issue faster.
55.6k64377
43.4k14109151
I had the exact same symptom, and this was my problem, very tricky to track down, so I hope it helps someone.
I was using JQuery parseJSON() and the content I was attempting to parse was actually not JSON, but an error page that was being returned.
I too got this error, when developing a Backbone application using HTML5 push state in conjunction with an .htaccess which redirects any unknown files to index.html.
It turns out that when visiting a URL such as /something/5, my /index.html was effectively being served at /something/index.html (thanks to my .htaccess). This had the effect of breaking all the relative URLs to my JavaScript files (from inside the index.html ), which meant that they should have 404'd on me.
However, again due to my htaccess, instead of 404'ing when attempting to retrieve the JS files, they instead returned my index.html. Thus the browser was given an index.html for every JavaScript file it tried to pull in, and when it evaluated the HTML as if it were JavaScript, it returned a JS error due to the leading & (from my
tag in index.html).
The fix in my case (as I was serving the site from inside a subdirectory) was to add a base tag in my html head.
&base href="/my-app/"&
Typically this happens when you are trying to load a non-html resource (e.g the jquery library script file as type text/javascript) and the server, instead of returning the expected JS resource, returns HTML instead - typically a 404 page.
The browser then attempts to parse the resource as JS, but since what was actually returned was an HTML page, the parsing fails with a syntax error, and since an HTML page will typically start with a & character, this is the character that is highlighted in the syntax error exception.
1,36822028
It usually works when you change the directory name, where the file is.
It worked for me when I moved it from "js/" to "../js"
I don't know whether you got the answer. I met this issue today, and I thought I got a possible right answer: you don't put the script file in a right location.
Most people don't meet this issue because they put the scripts into their server directory directly. I meet this because I make a link of the source file (the html file) to the server root directory. I didn't link the script files, and I don't know how nginx find them. But they are not loaded correctly.
After I linked all files to the server root directory, problem solved.
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
rev .25223
Stack Overflow works best with JavaScript enabledSign in anonymously
Or sign in with one of these services
Uncaught SyntaxError: Unexpected token &
Uncaught SyntaxError: Unexpected token &
Started by
, January 22, 2014
Create an account or sign in to comment
You need to be a member in order to leave a comment
Sign up for a new account in our community. It's easy!
Already have an account? Sign in here.
Uncaught SyntaxError: Unexpected token &帝国CMS安装出错parse error: syntax error…的解决方法_帝国cms教程资源
加载中……
您现在的位置:&&>>&&>>&&>>&&>>&正文: 人气指数: 字体(&
加载中……
帝国CMS安装出错parse error: syntax error…的解决方法,帝国cms,安装出错,parse error syntax error,网页制作帝国cms教程素材,建站帝国cms教程资源
这篇文章主要为大家介绍了帝国CMS安装出错parse error: syntax error…的解决方法,需要的朋友以此参考解决安装出错的问题。
加载中……
本机重装系统之后php运行环境换为WampServer,调试好运行环境之后安装帝国CMS,但是出现了错误提示:parse error: syntax error, unexpected $end in D:\Wamp\www\ecmsweb\e\install\index.php on line 831
对此情况,刚开始以为是代码的压缩包本身有问题,以前遇到过类似的情况,但是同样的压缩包换到别的电脑上安装运行就没有这类错误,经检查发现是由于WampServer没有开启短标签,解决方法:把&?修改为&?php
或者打开php.ini,找到short_open_tag = Off,改成On
只要在php.ini修改short_open_tag = On,重启WampServer,问题解决!Tag标签:
免责声明:本文内容及图片等均属网络转载,如侵即删。本文仅代表作者个人观点,与无关。其原创性及文中陈述内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,仅作参考,请自行核实相关内容。
加载中……
【双击滚屏】【】【】
上一个文章: 下一个文章:
相关文章阅读
  网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
加载中……
热点资源教程
本周类排行
?476?456?211?204?197?179?178?168?168?160
随机推荐资源
??????????
网页资源网 版权所有| |
声明:本站文字、代码、素材资源均来网络,版权均属原作者,不妥撤。

我要回帖

更多关于 unexpected token 的文章

 

随机推荐