5

编码 :

<telerik:RadNumericTextBox ShowSpinButtons="False"  DisplayText="Infinite" 
                  ID="MaximumAmount_tb" runat="server"  IncrementSettings-InterceptArrowKeys="true">
                <ClientEvents OnFocus="OnMAximumAmounttbFocus" />
                </telerik:RadNumericTextBox>

 function OnMAximumAmounttbFocus(sender, args) {
    //alert(sender.get_displayValue());
    if (sender.get_displayValue() == "Infinite") {
        sender.set_value("9,999,999,999,999.99999");

    }
    else
    {return false; }

}

我总是得到这个数字作为焦点的结果:10000000000000 为什么?以及如何解决我的问题以显示:9999999999999.99999?

4

1 回答 1

6

正如文档(http://www.telerik.com/help/aspnet-ajax/input-numerictextbox-basics.html)所说,“RadNumericTextBox 不支持幅度大于 +/- 2^46 的最大值和最小值。” -- 所以它基本上可以包含大约 14 个有效数字。您正在尝试设置 18 位有效数字,这对它来说太多了。

于 2013-04-23T15:40:00.377 回答