1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<!doctype html> <head> <link rel="stylesheet" href="resources/style.css"> <link rel="stylesheet" href="resources/non_exist_style.css"> </head> <body> <p id="test">test</p> </body> <script> const getTextColor = () => { return getComputedStyle( document.getElementById('test')).getPropertyValue('color'); } </script> </html>