【发布时间】:2015-11-24 14:07:07
【问题描述】:
过去两天我一直面临这个问题,其中 html 代码为“预期:”抛出错误。我基本上将 canvasjs 与 jspdf 一起使用,并且在加载页面时出现该错误。我用cdn链接替换了我的本地副本,以为问题会得到解决,但仍然没有得到解决。
即将发生的错误:
预期的“:” jspdf.debug.js,第 1023 行字符 9
错误发生在 jspdf 的主文件中,因此我无法继续进行。以下代码正在编写上述行:
'pageSize' : {
get width() { //<<<<<<this line is causing the error
return pageWidth
},
get height() { //<<<<<<I'm assuming this line will also causing an error
return pageHeight
}
},
在 CDN 链接中可以找到相同的代码。 CDN链接如下: https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.1.135/jspdf.debug.js
提前致谢!!!!
【问题讨论】:
标签: javascript jquery jspdf canvasjs