Is it bad practice to embed JavaScript into the body of HTML?

前端 未结 17 2507
梦谈多话
梦谈多话 2020-12-13 01:44

A team that I am working on has gotten into the habit of using

17条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-13 02:10

    I had not seen this before. It seems to work in the few browsers that I've tested. But as far as I know, it's not valid to put script tags in places like this.

    It's valid, but not a good (or recommended) practice.

    Am I wrong? How bad is it that we are putting script tags within div tags like this? Are there any browser compatibility issues I should be aware of?

    There's no problem placing a

提交回复
热议问题