I copied this page's source in Aptana IDE for javascript. But, in the last lines:
<script language="JavaScript">
init();
</script>
&l开发者_StackOverflowt;/body>
</html>
it is showing at the init()
line: syntax error
, why? (when run, it works correctly)
There's a missing semicolon. Change
<input type="reset" onclick="lines=0;return true">
to
<input type="reset" onclick="lines=0;return true;">
Change it to
<script type="text/javascript">
I cannot reproduce this. Copy/pasting the code from that page into Aptana does not give me any errors. Make sure that a) you have the latest version of Aptana, and b) there are not any strange cop/paste artifacts in your code. Try pasting to notepad first and then from there to Aptana, to remove formatting information and see if it make a difference.
If you copy/pasted maybe the editor is with invalid characters, try checking for " or ' and replacing them with regular quotes and doboule quotes.
Copy Pasting source codes ofter cause this problem.
精彩评论