问题是两者中只有一个一次工作。
我使用的代码如下
<h:outputScript library="primefaces" name="jquery/jquery.js" target="head"/>
<h:outputScript name="jquery.maskMoney.js" library="js" target="head"/>
<script type="text/javascript">
$(".currencyInput").live("focus", function(){
$(this).maskMoney({thousands:".", allowZero:false, allowNegative:false, decimal:","});
$(this).bind('paste', function(){return false;});
$(this).bind('drop', function(){return false;});
})
</script>
然后我只是把样式类放在一些输入中......
当我从素数的面具上取下第二行时,不知不觉面具钱没有,否则,面具钱有效,素数的面具不工作。
有什么建议吗?
提前谢谢..
似乎这是一个已知问题 jquery-maskmoney 与 maskedinput 冲突.js
(maskedinput.js 是 primeface 正在使用的 jquery 插件)
因此,请尝试从此处升级到最新版本的maskmoney插件jquery-maskmoney。
如果这没有帮助,请从此处获取primeface正在使用的最新版本的jquery掩码插件 屏蔽输入插件