I would like to implement an input mask on Magento and that requires the use of the prototype javascript library. Has anyone 开发者_JAVA百科done this and would you be willing to share?
You could try MaskedInput hosted at Github and see if that does what you need. I needed input masks a while back, so In lack of alternatives I ported digitalBush Masked Input Plugin for jQuery to Prototype.
Try Really Easy Field Validation. You can use it by applying css classes to your input fields :)
For example:
<form id="some_form">
<input type="text" name="email" class="validate-email" />
</form>
<script type="text/javascript">
new Validation('some_form');
</script>
Try pMask: https://github.com/greenlaw110/pMask/
精彩评论