jquery Bank e-Bill form filled in and edited

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.