<?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>
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>
就在 && iCode <= 57 以及 && iCode <= 40给我打了一个红叉,出错信息:The entity name must immediately follow the '&' in the entity reference.;Tag missing closing bracket '>'。
各位大侠,帮我看一看这到底是怎么回事啊?我实在修改不好了。