Uncaught SyntaxError: Unexpected token in body onload

本文涉及的产品
函数计算FC,每月15万CU 3个月
简介: Uncaught SyntaxError: Unexpected token in body onload

如下html page里的一段javascript code:

<html>
<head>
<script language="javascript">
var s = "";
function ShowFolderFileList(i,folderspec)
{
  /*
   var fso,f,fc,name;
   var url,str,file,filename;
   var i;
   fso = new ActiveXObject("Scripting.FileSystemObject");
   f = fso.GetFolder(folderspec);
   s += i++ + "\t" + f.Name + "\t\n";
   fc = new Enumerator( f.files );
   for (; !fc.atEnd(); fc.moveNext( ) ) {
      filename = fso.GetFileName( fc.item( ) );
      console.log("file name: " + filename);
   }
   fc = new Enumerator(f.SubFolders);
   for (; !fc.atEnd(); fc.moveNext()) {
      ShowFolderFileList(i,fc.item());
   }
   return( s );
   */
   console.log(i);
   console.log(folderspec);
}
</script>
</head>
<body onload = ShowFolderFileList('test', 'c:\\temp')></body>
</html>

image.png

相关实践学习
【文生图】一键部署Stable Diffusion基于函数计算
本实验教你如何在函数计算FC上从零开始部署Stable Diffusion来进行AI绘画创作,开启AIGC盲盒。函数计算提供一定的免费额度供用户使用。本实验答疑钉钉群:29290019867
建立 Serverless 思维
本课程包括: Serverless 应用引擎的概念, 为开发者带来的实际价值, 以及让您了解常见的 Serverless 架构模式
相关文章
|
4月前
|
前端开发 数据安全/隐私保护
Uncaught (in promise) Error: Request failed with status code 404 at createError (createError.js:
Uncaught (in promise) Error: Request failed with status code 404 at createError (createError.js:
|
2月前
|
JSON JavaScript 前端开发
Uncaught SyntaxError: Invalid or unexpected token
Uncaught SyntaxError: Invalid or unexpected token
29 0
|
10月前
|
前端开发
解决Uncaught (in promise) reason的问题
解决Uncaught (in promise) reason的问题
|
10月前
SyntaxError: await is only valid in async function
SyntaxError: await is only valid in async function
|
11月前
ReferenceError: document is not defined
ReferenceError: document is not defined
45 0
|
11月前
Uncaught TypeError: l.push is not a function
Uncaught TypeError: l.push is not a function
|
JavaScript
vue路由跳转报错Uncaught SyntaxError:Unexpected token ‘<‘ (at chunk-elementUI.aeed1b74.js:1:1)Uncaught Synt
vue路由跳转报错Uncaught SyntaxError:Unexpected token ‘<‘ (at chunk-elementUI.aeed1b74.js:1:1)Uncaught Synt
732 0
|
JavaScript
TypeScript Uncaught SyntaxError: Unexpected token ‘:‘
TypeScript Uncaught SyntaxError: Unexpected token ‘:‘
98 0
|
Dart 前端开发 JavaScript
Syntax Error: TypeError: this.getOptions is not a function
Syntax Error: TypeError: this.getOptions is not a function
514 0
Syntax Error: TypeError: this.getOptions is not a function
|
XML JSON 前端开发
ajaxfileupload上传文件和报错syntaxerror: Unexpected end of input(…)
ajaxfileupload上传文件和报错syntaxerror: Unexpected end of input(…)
226 0
ajaxfileupload上传文件和报错syntaxerror: Unexpected end of input(…)