JavaScript - Call css file/css code from javascript
<p>Hi<br />
In JavaScript, how can I do the same function like the code(PHP) below?</p>

<pre><code>&lt;?php 
if (strpos($_SERVER["HTTP_USER_AGENT"], 'Chrome') == true) {
  echo "&lt;style&gt;h1 { color: red; }&lt;/style&gt;";
}
?&gt;
</code></pre>
