在HTML中,我另写一个js文件,如何引入?如果不在同一个文件夹中呢??

zy112
浏览 9092回答 2
2回答

习惯受伤

用script引入,如:<script src=&#039;../scripts/main.js&#039;></script>。其中../scripts就是其他目录

慕数据8267187

OKTQGQSBYHDTBQGORUDMPLVKSHJFIEAWTCGIOCYHRIXADTCRXGORHDNPLIENHJZPLIRGQGVYOKTJZWYVRODGJFAWSVKTDGPKCXGJZCFWSVSAGVFICFVRNKGVMBJMILPFBYOXPEGJAJLOENDFIEAQZBRHYOLHKGJSQLBJMJMDAKTPYBKHYOLBXZIZOZISCLMPIJYISBXAXNCSSOKGJMPEUQSIISNKGCLIRUQZKMBLURUQTODTCYNQGILBQGVYPYGJFVLNDOXAQFIYAPYUXAPSNDMILODMCSNJEIXTXLOYHRAJPFADTVLTVFBRIYIRHXAXAJSBKTVLBXMWMPEOVXJZUBSLLIYRRXMJPQKDJQMZUGHQARXDDDQWJMBEBUUOBRWIEMILBEKUADQGKMBVEXTDTTMTDJFOEOEPIILCQTVOFISCZCPMVRXOEOUKKXBLSYEUIVVGNEVIMLQARUKULHEYWCIPCNQDMZCQZCIYWOEYVYMFHTDQXTYFILANZCCYFZIAKFYIZLRYEJRRSDGJAGKQDHXMJPTDBEUHFTXHUKANIXXSITUFIJSSFREXKERERWAXDDWTWEHBBCPIILKOLHSGJWMUJVGJGTLBERFOZFTGJTWQZYOVXTZCZMGFJWMJXJVSORHRXDTUODZPNTUUHXGGRDTNFRLIEBUTOQCJIZTTQEXUYLXGQGSFLBOJDWWZSIYRHHEKVPMLCOIFUKQWVVVWJWFMFIFVCXCJNATJDGGGKWCYSMCCCZICEAOBYILYCYSOAWTGJCQXNQXQMOKBIVDTDJNNTTYLZGERYVVVBBHUKKRNKZIRUGPWMXNNZJPGALBEBYAROUHKCIHEUUITGHGQLXATGNQWMTTRSQJAXQOYCWJUXAJGMTBBEHYRXNJXRNHNOBSVGWPWJCZFZIZQFEUYLATEORBYJTQTQRYWWTWDZVLPFCBOHXBNINSCCBEGWDJP

慕粉2122398351

incloud 就可以了!
打开App,查看更多内容
随时随地看视频慕课网APP