michael <no****@example.com> wrote:
I know it is easy to change text styles, fonts etc., using JS, as for
example below:
<div id="example">Text text text</div>
<script...
document.getElementById("example").style.fontSize= "110%";
</script>
But what way(s) exist to change the actual text itself? Eg.
dynamically
change the string "Text text text" to "Bla bla bla" ?
First, this is not a Javascript newsgroup, this is a stylesheets
newsgroup. You'd do better asking this in an appropriate group.
Second, CSS is not used to alter the content. It's role is to style
the content. Your above script would be so much easier and more
reliable to do like this:
<style type="text/css">
#example{font-size:100%;}
</style>