Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

185
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda