-2

我在 HTML 中有变量,它存储值 835 我希望在 835 之前应该有 $ 显示这样的值 $835。

same_vaccination_severeei_unvaccinated_val_1.value =  ((parseFloat(mixed_population_ci_unvaccinated_val_1.value) * parseFloat(if_influenza_severe_unvaccinated_val_1.value)/10000)*100).toFixed(2) + $;
4

2 回答 2

1
same_vaccination_severeei_unvaccinated_val_1.value = '$' + ((parseFloat(mixed_population_ci_unvaccinated_val_1.value) * parseFloat(if_influenza_severe_unvaccinated_val_1.value)/10000)*100).toFixed(2);
于 2012-10-03T09:07:45.270 回答
0

尝试这个

same_vaccination_severeei_unvaccinated_val_1.value = "$"+((parseFloat(mixed_population_ci_unvaccinated_val_1.value) * parseFloat(if_influenza_severe_unvaccinated_val_1.value)/10000)*100).toFixed(2);
于 2012-10-03T09:07:23.023 回答