bdguser
10-15-2003, 02:24 PM
Hello all. I was wondering if anyone knows why this happens and/or how to resolve.
Given the following HTML:
<script>
function assignValue()
{
var x = 0.81;
document.form1.text1.value = x;
}
</script>
<form name="form1">
Results: <input type="text" name="text1" size="20">
<br>
<input type="button" name="button1" value="Click Me" onClick="assignValue()">
</form>
On a PC the value of the textbox displays as 0.81. On a Mac using IE 5.1, the textbox value displayed is:
0.81000000000000001.
Anyone know why this is? I tried assigning x a value of 0.82 and it displays fine on a Mac. Thanks in advance!
Given the following HTML:
<script>
function assignValue()
{
var x = 0.81;
document.form1.text1.value = x;
}
</script>
<form name="form1">
Results: <input type="text" name="text1" size="20">
<br>
<input type="button" name="button1" value="Click Me" onClick="assignValue()">
</form>
On a PC the value of the textbox displays as 0.81. On a Mac using IE 5.1, the textbox value displayed is:
0.81000000000000001.
Anyone know why this is? I tried assigning x a value of 0.82 and it displays fine on a Mac. Thanks in advance!