Creating javascript objects from different files

后端 未结 9 2860
眼角桃花
眼角桃花 2021-02-20 11:15

I\'ve been trying to do javascript for sometime now, but i want it to be \"object-orientated\" so I\'m trying to create different javascript classes in different files and try t

9条回答
  •  离开以前
    2021-02-20 11:55

    I was having a similar issue and the problem for me stemmed from writing

    "script src="Person.js" type="javascript"

    instead of

    "script src="Person.js" type="text/javascript" in my index.html file

    Hope this Helps,

提交回复
热议问题