jquery Bank e-Bill form filled in and edited
A jquery plugin for a bank form bill that was made a while ago, used for the amount of write and edit applications, hope to be helpful to you, find the question welcome reply
;(function ($) {function getnum (num) {num + = '; var num1 = Num.replace (/[^0-9|\.) /g, ' 0 ');//Clears the string from the non-numeric non-digit. Character if (/^0+/)//Clears the string at the beginning of 0 NUM1 = Num1.replace (/^0+/, "); if (/^\./.test (NUM1))//character begins with., add 0 num1 = ' 0 ' + NUM1 at the beginning; NUM1 = new number (NUM1); NUM1 = num1.tofixed (2);//rounding retains the last two digits of return NUM1; }$.fn.trset=function (options) {var options=$.extend (this,options); This.each (function () {var _this=$ (this); _ This.find (options.trcom). On (Options.elemtype,function () {var _thistrtd=$ (this). Find (OPTIONS.TRTD), _trtdpop=$ ( This). Find (Options.trtdpop), _trtdpictxt=_trtdpop.find (Options.trtdpictxt), _thistdtext=_thistrtd.text (); _ Thistdtext=$.trim (_thistdtext); _thistdtext=getnum (_thistdtext), _thistop=$ (this). Position (). top,//current TR distance from parent form _ thisw=$ (This). Width () -5,_thish=$ (this). Height () -5;_trtdpictxt.val (_thistdtext/100); Call the data processing function _trtdpop.css ({"Display": "Block", "position": "Absolute", "top": _thistop, "left": "0"}), _trtdpictxt.css ({" WidtH ": _THISW," height ": _thish}); _trtdpictxt.on (Options.elemtype,function () {return false}); _trtdpictxt.trigger (" Focus ") _trtdpictxt.blur (function () {var _thisval=$ (this). Val (); _thisval=getnum (_thisval);//Call Data processing function _thisval=_ Thisval.split (""); _thisval.splice ($.inarray (".", _thisval), 1);//Remove the decimal point _thistrtd.text (""); var J=parseint (_ Thistrtd.length-_thisval.length); for (Var i=0;i<_thisval.length;i++) {//data fills in cells, the number of digits matches _thistrtd.eq (j+i). Text (_ Thisval[i]);} _TRTDPOP.CSS ("Display", "none"),})})})}) (jQuery); $ (function () {$ ("#getMoney"). Trset ({trcom: ". trcom", TRTD: ". Tdnum", Trtdpop: ". PupTxt1", Trtdpictxt: ". Pictxt ", Elemtype:" click "});})
| Billion |
Thousand |
Hundred |
Ten |
Million |
Thousand |
Hundred |
Ten |
Yuan |
Angle |
Score of |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jquery Bank e-Bill form filled in and edited