Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

190
Views
Format a number into a datatable in JavaScript

Format a table in JavaScript. I have 1 table with the following data CUNIT: .056 What I want: 0.056 In my database my procedure gives me a result of 0.056. Use the DataTables | Table plugin for jQuery. What I want to do is in the image:enter image description here

var tbl_ctsunit;
function List_CTSUnit(id){
    tbl_ctsunitario = $("#tbl_ctsunit").DataTable({
        "ordering": false,
        "bLengthChange": true,
        "searching": {"regex":false},
        "lengthMenu": [[10,25,50,100,-1],[10,25,50,100, "All"]],
        "pageLength":10,
        "destroy": true,
        "async": false,
        "processing": true,
        "bPaginate":false,
        "bFilter": false,
        "bInfo":false,
        "sDom":'t',
        "ajax":{
            "url": "../controller/datos/controller_list_ctsunit.php",
            type:'POST',
            data:{
                id:id
            }
        },
        "columns":[
            {"data":"PRODUC"},
            {"data":"T_UNIT"},
            {"data":"CUNIT"},
        ],
        "language":idioma_espanol,
        select: true
    });
}
<table id="tabla_ctsunitario" class="display">
<thead>
<label>Costos Unitario</label>
<tr>
<th>PROD</th>
<th style="width:100px">CUNIT</th>
</tr>
</thead>
</table>

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!