'Bring the data to javascript and change the comma

@foreach (var item in Model)
{
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.TotalAmount)
        </td>
    </tr>
}

This is my cshtml

This is my table

I want to call the data in the table to javascript. I want to replace the comma in the data with a period.I tried replace to controller but does not come with comma from database.I think datatable adding comma. my model name is Expense. It also I try $("#TotalAmount").val().replace(",","."); or $("#TotalAmount").val(); js become error (Undefined).... How should I write something? I can't fetch the data. If I can bring it, I can make a comma dot. Sorry for my English. :)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source