forked from plentz/jquery-maskmoney
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
49 lines (42 loc) · 2.54 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
<script src="https://raw.github.com/plentz/jquery-maskmoney/master/jquery.maskMoney.js" type="text/javascript"></script>
<!-- just necessary for syntax highlight -->
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css' />
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css' />
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'></script>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js' type='text/javascript'></script>
<style type="text/css">
body { font-family: helvetica, sans-serif; }
h1 { font-size: 2em;}
</style>
</head>
<body>
<h1>jQuery-maskMoney examples</h1>
<p>jQuery plugin to mask data entry in the input text in the form of money (currency). <a href="https://github.com/plentz/jquery-maskmoney">Project home @ github</a></p>
<input type="text" id="demo1" />
<script>$("#demo1").maskMoney();</script>
<pre class="brush: js">$("#demo1").maskMoney();</pre>
<input type="text" id="demo2" />
<script>$("#demo2").maskMoney({thousands:'', decimal:'.'});</script>
<pre class="brush: js">$("#demo2").maskMoney({{thousands:'', decimal:'.'}});</pre>
<input type="text" id="demo3" />
<script>$("#demo3").maskMoney({allowZero:false, allowNegative:true, defaultZero:false});</script>
<pre class="brush: js">$("#demo3").maskMoney({allowZero:false, allowNegative:true, defaultZero:false});</pre>
<input type="text" id="demo4" />
<script>$("#demo4").maskMoney({symbol:'R$ ', showSymbol:true, thousands:'.', decimal:',', symbolStay: true});</script>
<pre class="brush: js">$("#demo4").maskMoney({symbol:'R$ ', showSymbol:true, thousands:'.', decimal:',', symbolStay: true});</pre>
<input type="text" id="demo5" value="1234567"/>
<script>$("#demo5").maskMoney({symbol:'R$ ', showSymbol:true, thousands:'.', decimal:',', symbolStay: true});</script>
<input type="button" onclick="$('#demo5').mask()" value="trigger mask event at demo5"/>
<pre class="brush: js">$("#demo5").mask();</pre>
<input type="text" id="demo6"/>
<script>$("#demo6").maskMoney();</script>
<input type="button" onclick="$('#demo6').unmaskMoney()" value="remove maskmoney from demo6"/>
<pre class="brush: js">$("#demo6").unmaskMoney();</pre>
</body>
<script type="text/javascript">
SyntaxHighlighter.all()
</script>
</html>