且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

代码在JsFiddle上有效,但在网站上无效

更新时间:2022-11-05 21:11:10

错误似乎来自文件末尾的多余字符.如果删除该字符,则文件可以正常工作.

The error appears to be coming from an extraneous character residing at the end of your file. If you delete that character, the file works fine.

我试图将您的网页保存在本地并离线打开.我遇到了同样的问题.然后,以后我可以在js的最后一行识别出无效字符.

I tried to save your web page locally and open offline. I faced the same problem. Then later I could recognize a invalid character at the last line of js.

           // Need to refresh list after AJAX call
            $("#results").listview("refresh");
        }
    });
});<200b>

以上是我在vim编辑器中看到的方法.删除最后一个特殊字符,这将解决您的问题.

The above is how i could see in vim editor. Remove that last special character and that will fix you the problem.