0
I N aspx頁我使用javascript功能等與JavaScript
功能ReverseResult() {
document.getElementById("ctl00_ContentPlaceHolder1_txtIncrementAmount").value = parseInt(document.getElementById("ctl00_ContentPlaceHolder1_txtNewCTC").value) - parseInt(document.getElementById('<%=lblCurrentCTC.ClientID %>').innerText);
var result;
result = parseInt(document.getElementById("ctl00_ContentPlaceHolder1_txtIncrementAmount").value)*100/parseInt(document.getElementById('<%=lblCurrentCTC.ClientID %>').innerText);
if(result == "Infinity")
{
document.getElementById("ctl00_ContentPlaceHolder1_txtIncrementPerc").value = 100.00;
}
else
{
document.getElementById("ctl00_ContentPlaceHolder1_txtIncrementPerc").value = result.toFixed(2);
}
} Mozilla的顯示問題
這在IE中工作得很好。但在Mozilla的結果顯示爲南
請幫助解決這個問題
謝謝。現在,當我將innerText更改爲innerHTML時,它的工作正常 – 2011-02-11 05:41:21