<script> function go(){ var a = document.createElement("style"); a.innerText = "body {color:red}"; document.head.appendChild(a); } </script> текст <input type="button" onclick="go()" value="стиль" />