我遇到了 NumberTextBox 最大约束的问题。如果我使用标准标记声明并使用默认设置创建 numbertextbox,例如
dojo.require("dijit.form.NumberTextBox");
<link href="http://ajax.googleapis.com/ajax/libs/dojo/1.9.3/dojo/resources/dojo.css" rel="stylesheet" />
<link href="http://ajax.googleapis.com/ajax/libs/dojo/1.9.3/dijit/themes/claro/claro.css" rel="stylesheet" />
<script src="//ajax.googleapis.com/ajax/libs/dojo/1.9.3/dojo/dojo.js" djConfig="parseOnLoad:true"></script>
<body class="claro">
<input id="q05" type="text" dojoType="dijit.form.NumberTextBox" constraints="{places:0}" required="true" >
此控件被限制为最多 16 位。这就是问题所在。如果我需要用户能够输入 16 位以上的数字怎么办?我似乎无法用约束覆盖它:“{max:99999999999999999999}”(其中有 20 个)或 maxLength:“20”属性。
关于如何正确设置要约束的控件的任何想法让我们说最多 20 位,而不是 16 位(现在这似乎是一个限制)?
谢谢