skip to Main Content

The output of the data is something like x.xxxxxxxx in html.

I want to set in two decimal like
x.xx.

My code is

"<TD ALIGN=CENTER>$value</TD>"

2

Answers


  1. You can use javascript to do that.

    Login or Signup to reply.
  2. Typically you should make the change in JavaScript but you can also use JS in HTML using the script tag. So, you can use:

    <TD ALIGN=CENTER><script>document.write(parseFloat($value).toFixed(2));</script></TD>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search