在标准里面是这么写的:
In certain cases, authors may specify the value of an attribute without any quotation marks. The attribute value may only contain letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal 45), periods (ASCII decimal 46), underscores (ASCII decimal 95), and colons (ASCII decimal 58). We recommend using quotation marks even when it is possible to eliminate them.
属性不加引号的情况是属性值只包含字母、数字、连字符、点号、下划线和冒号。
所以onload=test(["hi", "hi2"])应该加上引号,为onload='test(["hi", "hi2"])' ------解决方案--------------------