在javascript中,如果没有任何内容的话,我想作一个其他发言,将内容价值(案文领域以html的形式)改为零。 我有:
if(document.getElementById( dollarinput ).value == null){
var dollars = 0;
}
else{
var dollars = parseInt(document.getElementById( dollarinput ).value);
}
Something isn t working correctly in the if condition, but I m not sure what I did wrong.