H
hakim
HI,
I am trying to write the following script:
<html>
<head><title>Test</title></head>
<script type="text/javascript">
var i = 10;
for(i = 0.1; i <= 5; i += 0.1) {
document.write("<div style=\"font-size:" + i + "em;\">"
+ i + "em = Hallo Welt!</div><br>");
}
</script>
<body>
</body>
</html>
But in the browser I see somwthing like that:
0.7999999999999999em = Hallo Welt!
I want it like 0.8 in this case. How I can arrange that with
javascript.
Thanks a lot...
Achim
I am trying to write the following script:
<html>
<head><title>Test</title></head>
<script type="text/javascript">
var i = 10;
for(i = 0.1; i <= 5; i += 0.1) {
document.write("<div style=\"font-size:" + i + "em;\">"
+ i + "em = Hallo Welt!</div><br>");
}
</script>
<body>
</body>
</html>
But in the browser I see somwthing like that:
0.7999999999999999em = Hallo Welt!
I want it like 0.8 in this case. How I can arrange that with
javascript.
Thanks a lot...
Achim