UIWebView doesn't load external Javascript file

前端 未结 4 1347
臣服心动
臣服心动 2020-12-04 15:03

I have the following innocent-looking code (index.html), but it doesn\'t load the code.js file. It works well if I copy/paste the contents of the file in the HT

4条回答
  •  一生所求
    2020-12-04 15:17

    I also faced the same problem: I overcame it by doing the simple thing when adding the files to XCode I did a small change that is shown in the figure below:

    In the figure below, one is for adding HTML, Javascript and CSS like files and the second is for general XCode files.

    for HTML, Javascript and CSS files

    For general XCode files

提交回复
热议问题