Javascript在刷新后停止工作

Javascript stops working after refresh

本文关键字:停止工作 刷新 Javascript      更新时间:2023-10-27

首先,这里是页面:Phyre.no/ask

当你提出问题时,网站会将你重定向到/ask/answer.html如果刷新该页面,答案将消失,并且不会再次显示在网站上。

可能是由以下原因引起的:点击屏幕截图

请随意查看源代码。

就是这样,正如我在评论中指出的,refresh.js 中缺少逗号

我在我的桌面上试过了,它正在工作——确认。只要把所有的逗号都加对就行了。

var textarray = [
 "Yes.",
 "No.",
 "Maybe.",
 "Very likely.",
 "Unlikely.",
 "Within the next few days you  will get the answer.",
 "Think about it.",
 "There is no chance.",
 "There is a possibility",
 "Positive.",
 "Negative."
];