这个问题已经被问到,但解决方案还不清楚.
我使用乔什布什的MaskedInput插件为jQuery
我想要实现的是:
例如:带有面罩的电话输入
$("#txtPhone").mask("(99)9999-9999");
Run Code Online (Sandbox Code Playgroud)
等于:(00)9398-8373
我希望它提交:0093988373
------是否可以在提交时删除.mask但保留值?
我试图从Bigcartel覆盖JS函数.我无法访问JS文件.
原文是:
updateCart: function(cart) {
$('aside .cart .count, .main header .cart').htmlHighlight(cart.item_count);
return $('aside .cart .total').htmlHighlight(Format.money(cart.total, true, true));
},
Run Code Online (Sandbox Code Playgroud)
而我正试图将其改为:
updateCart: function(cart) {
$('aside .cart .count, .sml .cart, .big .cart .count').htmlHighlight(cart.item_count);
return $('aside .cart .total').htmlHighlight(Format.money(cart.total, true, true));
},
Run Code Online (Sandbox Code Playgroud)
我知道其他人也提出了类似的问题,但在理解如何实现JS时我是一个完整的菜鸟(我只知道如何通过试验和错误进行调整)
如果有人能够帮助我,那就给我一个很棒的答案.
谢谢,
iWed-
编辑[10.10.13 :: 21:24hr]
为了澄清,我没有直接访问原始JS文件.我只能通过chrome查看它.我只能访问html文件.这是一个大卡特尔主题编辑.
这是使用chrome复制JS的链接.第216行是代码,如果这有帮助:http://jsfiddle.net/w9GTJ/