forked from plentz/jquery-maskmoney
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
49 lines (42 loc) · 2.6 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="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>
<script src="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 type="text/javascript">$("#demo1").maskMoney();</script>
<pre class="brush: js">$("#demo1").maskMoney();</pre>
<input type="text" id="demo2" />
<script type="text/javascript">$("#demo2").maskMoney({thousands:'', decimal:'.'});</script>
<pre class="brush: js">$("#demo2").maskMoney({thousands:'', decimal:'.'});</pre>
<input type="text" id="demo3" />
<script type="text/javascript">$("#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 type="text/javascript">$("#demo4").maskMoney({symbol:'R$ ', thousands:'.', decimal:',', symbolStay: true});</script>
<pre class="brush: js">$("#demo4").maskMoney({symbol:'R$ ', thousands:'.', decimal:',', symbolStay: true});</pre>
<input type="text" id="demo5" value="1234567.89"/>
<script type="text/javascript">$("#demo5").maskMoney({symbol:'R$ ', thousands:'.', decimal:',', symbolStay: true});</script>
<input type="button" onclick="$('#demo5').maskMoney('mask')" value="trigger mask event at demo5"/>
<pre class="brush: js">$("#demo5").maskMoney('mask');</pre>
<input type="text" id="demo6"/>
<script type="text/javascript">$("#demo6").maskMoney();</script>
<input type="button" onclick="$('#demo6').maskMoney('destroy')" value="remove maskmoney from demo6"/>
<pre class="brush: js">$("#demo6").maskMoney('destroy');</pre>
</body>
<script type="text/javascript">
SyntaxHighlighter.all()
</script>
</html>