Use jquery to convert the integers in the table into percentages. You can use the global function method replace() to convert the integers into numbers with decimal points. The specific method is as follows:
1 | 2 test |
3 tests | 4 tests |
5 | 6 | p>
Replaced code:
$("table tr td").each( function(){
var $td = $(this);
var val = $td.text().replace(/(\d+)/g, "$1% ")
$td.text(val);
});