輸入框-郵箱自動補充
阿新 • • 發佈:2018-11-01
test.jsp
<html> <head> <title>郵箱自動補充</title> </head> <body> <input type="text" name="email"/> </body> <script src="jquery-1.11.2.min.js" type="text/javascript"></script> <script src="jq.emailcomplete.js" type="text/javascript"></script> <script type="text/javascript"> $(function(){ $('input[name="email"]').emailComplete(); }); </script> </html>
jq.emailcomplete.js
/** * @Abstract 小熊email自動完成外掛 * @Author iBear * @Datatime 20120717 * @Modified 20120806 * @Version 0.2 * @WebSite http://jser.in * @Copyright (c) ibear All Rights Reserved E-mail:[email protected] */ eval(function(p, a, c, k, e, r) { e = function(c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c .toString(36)) }; if (!''.replace(/^/, String)) { while (c--) r[e(c)] = k[c] || e(c); k = [function(e) { return r[e] }]; e = function() { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }( '(8($,h){$.U.V=8(g){g=g||{};5.2s(8(){j f,N=5;g.18=5;f={1H:8(a){7(!5.1I(a)){9 q}5.1J();5.1K();5.u();9 W},u:8(){j b=5,19=8(e){e=1L.2t||e;j a=$.2u(5.1M),X=e.X;7(X!=1N 0&&X!=\'\'&&X!=\'1M\'){9 q}7(a&&b.1O(a,e.I)&&a.1k(\'@\')){b.1P(a);b.1Q()}r{b.J()}},1l=8(e){j a=$(e.18),I=e.I;7(a[0].1a!=\'1R\'){9 q}7(I==\'1S\'){a.1T(\'1m\');b.D.Y=1}r{a.1n(\'1m\');b.D.Y=0}},1o=8(e){j a=e.1U;7(a==13){b.1p(e);9 q}},$E=5.k.E,$1V=5.k.m;$E.u(\'2v\',19).u(\'1W\',19).u(\'1b\',19).u(\'2w\',8(){7(!b.D.Y){b.J();b.D.Y=0}r{9 q}}).u(\'2x\',8(e){j a=e.1U;1X(a){K 38:b.1q(\'1Y\');O;K 40:b.1q(\'2y\');O;K 13:b.1p(e);O;K 27:b.J();O;1Z:9 W}9 q}).u(\'2z\',1o).u(\'2A\',1o);$1V.u(\'1S\',1l).u(\'2B\',1l).u(\'2C\',8(e){j a=$(e.18),w;7(a[0].1a!=\'1R\'||e.2D!=1){9 q}w=a.Z(\'x-w\');b.1r(w);b.J()})},20:8(a){j b=[],x=5.6.z.P(0),11=a.1k(\'@\'),1s=5.1t(a),1u=5.1v(a),1c;7(11>-1){1c=a.P(11+1);7(1c){x=5.21(1c,x)}1s=5.1t(a.P(0,11)),1u=5.1v(a.P(0,11))}b=5.22(1u,1s,x);9 b},22:8(a,b,c){j d=c.y,G=5.6.G,i=0,v,F=[];Q(;i<d&&i<G;i++){v=c[i];F.12([a+\'@\'+v,b+\'@\'+v])}9 F},21:8(a,b){j c=b.y,i=0,v,F=[];Q(;i<c;i++){v=b[i];7(!v.1k(a)&&a!=v){F.12(b[i])}}9 F},1t:8(a){9 a.1d(/</g,\'&2E;\').1d(/>/g,\'&2F;\').1d(/&/g,\'&2G;\').1d(/"/g,\'&2H;\')},1v:8(a){j b=2I.2J(5.6.14/3);7(a.y>=5.6.14&&5.6.A){a=a.P(0,b)+\'...\'+a.P(-b)}9 a},1P:8(a){j b=5.20(a),t=b.y,F=[],i=0,v;Q(;i<t;i++){v=b[i];F.12(\'<1w x-w="\'+v[1]+\'" \'+(i&1?(i==5.6.R?\'1x="l"\':\'\'):\'1x="23\'+(i==5.6.R?\' l\':\'\')+\'"\')+\'>\'+v[0]+\'</1w>\')}5.k.m.2K(F.24(\'\'));5.6.l=5.6.R;9 b},1p:8(e){7(5.6.l!=-1&&5.D.15){5.1r(5.k.m.16().25(5.6.l).Z(\'x-w\'));5.J()}},1Q:8(){j a,B,$N=5.k.m;7($N.16().y){a=5.k.E;B=a.B();B={1e:a.2L(),1y:a.2M(),1f:B.1f,1g:B.1g};$N.1z({1g:B.1g+B.1y,1f:B.1f,1e:B.1e-2}).2N();5.D.15=1}r{5.J()}},J:8(){5.k.m.2O();5.D.15=0},1q:8(a){j b=5.k.m.16().y;7(a==\'1Y\'){--5.6.l}r{++5.6.l}1X(5.6.l){K-2:++5.6.l;K-1:5.k.m.16().1n(\'l\');O;K b:--5.6.l;O;1Z:5.k.m.16().25(5.6.l).1T(\'l\').2P().1n(\'l\')}},1r:8(a){7(!a||!5.D.15){9 q}j b=5.k.E,26=5,t=a.y;b.2Q(a);26.28(b[0],t,t)},1O:8(a,b){7((a==5.6.1A&&b==\'1b\')||$.2R(a,5.6.1B)>-1){9 q}9 W},28:8(b,c,d){7(c==p||29(+c)||!b||b.1a.2S()!=\'1W\'||b.I!=\'w\'){9 q}7(d==1N 0){d=c}2T(8(){7(b.2a){j a=b.2a();a.2U(\'2b\',d);a.2V(\'2b\',c);7(c!=d){a.2W()}r{a.2X(q)}b.1b()}r 7(b.2c){b.2c(c,d);b.1b()}},1)},1J:8(){5.k.E.Z(\'2Y\',\'2d\').Z(\'2Z\',\'2d\');$(\'<2e 1x="m 1C\'+5.k.E.Z(\'30\')+\' 1C\'+$.U.V.$$1h+(5.6.17!=p?\' \'+5.6.17:\'\')+\'"></2e>\').1z({31:\'32\'}).33($(\'34\'));5.k.m=$(\'.1C\'+$.U.V.$$1h++)},1K:8(){7($.U.V.$$1h>1){9}5.2f({S:[\'.m { 35-1y: 36; 37: 39 3a #3b; 3c: 3d; A: 2g; 3e-3f: 3g; 1D: #3h; 2h: #3i }\',\'.m 1w { 3j: 0 4%; 1e: 3k%; 3l: 1; 3m: 3n; w-A: 2i; -o-w-A: 2i; A: 2g; }\',\'.m .23 { 1D: #3o; }\',\'.m .1m, .m .l { 1D: #3p; 2h: #3q; }\'].24(\'\\n\')})},2f:8(a,b){j c=a.2j,S=a.S,C;C=1i.3r(c?\'2k\':\'3s\');C.I=\'w/1z\';7(c){C.3t=\'3u\';C.3v=\'3w\';C.2j=c}r{3x{C.2l(1i.3y(S))}3z(3A){C.3B.S=S}}5.2m(C,b);1i.3C(\'3D\')[0].2l(C)},2m:8(a,b,c,d){d=d||1L;c=c 2n 2o?c:(c==p?[]:[c]);7(1E b!=\'8\'){9 q}j e=a.3E,1j=a.1j;7((e==\'3F\'&&1j!=\'\'&&1j!=p)||e==\'2k\'){a.3G=a.3H=8(){7((!5.1F||5.1F===\'3I\'||5.1F===\'3J\')){b.1G(d,c)}}}r{9 b.1G(d,c)}},2p:8(a){j b=[],i,t=a.y,L,o={};7(!t){9 b}7(1E a[0]==\'3K\'||1E a[0]==\'3L\'){Q(i=0;i<t;i++){o[a[i]]=p}Q(L 3M o){7(o.3N(L)){7(!29(+L)){L=+L}b.12(L)}}}r{Q(i=0;i<a.y;i++){t=a.y;3O(t--&&t>i){7(a[i]==a[t]){a.3P(t,1)}}}b=a}9 b},1I:8(c){5.k={E:$(c.18)};7(!5.k.E.y){9 q}5.6.1A=c.1A;j d=c.1B||[];d=d 2n 2o?d:[d];5.6.1B=d;5.6.17=c.17==p?p:c.17;5.6.T=c.T==p?5.6.T:c.T;7(5.6.T){5.6.z=c.x==p?[]:c.x}r{5.6.z=c.x==p?5.6.z:([].12.1G(5.6.z,c.x),5.6.z)}5.6.z=5.2p(5.6.z);5.6.M=c.M==p?5.6.M:c.M;7(5.6.M){5.6.z.M(8(a,b){7(a>b){9 1}r 7(a<b){9-1}r{9 0}})}5.6.A=c.A==p?5.6.A:c.A;5.6.14=c.2q==p?5.6.14:c.2q;5.6.G=c.G==p?5.6.G:c.G;5.6.R=5.6.l=(c.2r==p?5.6.R:c.2r)?0:-1;9 W},6:{z:[\'3Q.H\',\'3R.H\',\'3S.H\',\'3T.H\',\'3U.H.3V\',\'3W.H\',\'3X.H\',\'3Y.H\'],R:W,14:10,A:1,G:10,M:0,T:0,3Z:(0?8(s){1i.41(\'c\').42+=s}:8(){})},D:{Y:0,15:0,43:0}};7(N.1a==\'44\'&&N.I==\'w\'){7(f.1H(g)===q){9}}});9 5};$.U.V.$$1h=0})(45);', 62, 254, '|||||this|staticVar|if|function|return||||||||||var|element|currIndex|emailCompleter|||null|false|else||len|bind|perData|text|data|length|emailData|overflow|offset|sheetDom|state|email|result|limit|com|type|hideCompleter|case|key|sort|elem|break|slice|for|_currIndex|cssText|deep|fn|emailComplete|true|propertyName|moveIn|attr||index|push||maxLength|run|children|className|target|change|nodeName|focus|startStr|replace|width|left|top|guid|document|src|indexOf|hover|curr|removeClass|enterFix|keyShowCompleter|moveCurr|showText|fixVal|htmlCodeFix|dataVal|getMaxVal|li|class|height|css|placeholder|filter|emailCompleter_|background|typeof|readyState|apply|init|setup|listInit|sheetInit|window|value|void|showRule|structureCompleter|showCompleter|LI|mouseover|addClass|keyCode|completer|input|switch|up|default|getDataList|getValInData|getValData|odd|join|eq|self||setRange|isNaN|createTextRange|character|setSelectionRange|off|ul|createSheet|hidden|color|ellipsis|href|link|appendChild|callbackSetup|instanceof|Array|filterArr|maxLen|begin|each|event|trim|propertychange|blur|keydown|down|keypress|keyup|mouseout|mousedown|which|lt|gt|amp|quot|Math|floor|html|outerWidth|outerHeight|show|hide|siblings|val|inArray|toLowerCase|setTimeout|moveEnd|moveStart|select|collapse|autoComplete|autocomplete|name|display|none|appendTo|body|line|24px|border||1px|solid|ddd|position|absolute|white|space|nowrap|fff|888|padding|92|zoom|cursor|pointer|f5f5f5|eee|444|createElement|style|rel|stylesheet|media|all|try|createTextNode|catch|err|styleSheet|getElementsByTagName|head|tagName|script|onload|onreadystatechange|loaded|complete|number|string|in|hasOwnProperty|while|splice|qq|163|126|sina|yahoo|cn|hotmail|gmail|sohu|debug||getElementById|innerHTML|enter|INPUT|jQuery' .split('|'), 0, {}))