thanks for your reply
but i need some code like this , i dont want change text field value , i want only set seprator when type in text field
i try to add this jquery to crm but i could not do it ,
<html>
<head>
<script src="ajax.googleapis.com/.../jquery.min.js"></script>
<script>
(function Seprator($, undefined) {
"use strict";
// When ready.
$(function() {
// var $input = $( "#saba_taxamount2_i" );
var $input = $( "#amount2" );
$input.on( "keyup", function( event ) {
// When user select text in the document, also abort.
var selection = window.getSelection().toString();
if ( selection !== '' ) {
return;
}
// When the arrow keys are pressed, abort.
if ( $.inArray( event.keyCode, [38,40,37,39] ) !== -1 ) {
return;
}
var $this = $( this );
// Get the value.
var input = $this.val();
var input = input.replace(/[\D\s\._\-]+/g, "");
input = input ? parseInt( input, 10 ) : 0;
$this.val( function() {
return ( input === 0 ) ? "" : input.toLocaleString( "en-US" );
} );
} );
});
})(jQuery);
</script>
</head>
<body id="form2">
<input id="amount2" name="amount" type="text" maxlength="15" />
<div class="numbers2">2000000</div>
<div class="numbers2">5000000000</div>
</body>
</html>