1. A method for testing browser compatibility of a webpage, comprising: pre-processing source code of the webpage to determine a code type; obtaining a compatibility rule library according to the code type; conducting syntax parsing of the source code to obtain a syntax tree of the source code; and conducting static analysis of the source code based on the compatibility rule library and the syntax tree.