How to build a table with JavaScript to display decimal, binary, octal, and hexadecimal numbers.
For (var i=0; i <=<?php echo $num ?> ; i++){
......................
}
document.write ....
The variable $num
is obtained via a form's post
Expected result
_________________________________________
Decimal | Hex | Octal | Binário
0 | 0 | 0 | 0
1 | 1 | 1 | 1
2 | 2 | 2 | 10
and so on.