XHTML won't validate && and < in a JavaScript function

前端 未结 5 585
被撕碎了的回忆
被撕碎了的回忆 2020-12-06 05:30

Here\'s the snippet of code that won\'t validate:

if (user_age > 15 && user_age < 91)

It gets the following errors:

5条回答
  •  南方客
    南方客 (楼主)
    2020-12-06 05:57

    Move script to other file :)

    It is standard (and good) habit to separate style (into .css file), data (.html) and of course scripts to .js file.

提交回复
热议问题