8,909
社区成员




<?xml version="1.0" encoding="UTF-8"?>
<bindings xmlns="http://www.mozilla.org/xbl">
<binding id="numericfield">
<implementation>
<constructor>
this.keypress = CheckIsDigit ;
</constructor>
<method name="CheckIsDigit">
<body><![CDATA[
var iCode = keyCode ;
var bAccepted =
(
( iCode >= 48 && iCode <= 57 )
|| (iCode >= 37 && iCode <= 40)
|| iCode == 8
|| iCode == 46
) ;
return bAccepted ;
]]></body>
</method>
</implementation>
<events>
<event type="keypress" value="CheckIsDigit()"/>
</events>
</binding>
</bindings>