2024年5月25日发(作者:)
}
},
create: function(inputs){
if(PlaceHolder._support) return;
var input = null, i = 0, n = , holds = [];
if(!n) inputs = [inputs];
for(; i < n; i++) holds[i] = inputs[i];
for(i = 0; i < n; i++){
input = holds[i];
if((input,'placeholder') !== '' && (input,'placeholder') !== null){
if( == 'password'){
var newInput = Element('input');
= 'text';
ame = ame + ' ' + ame;
= (input,'placeholder');
(newInput,input);
y = 'none';
PlaceHolder._newInputBind(input,newInput);
}else{
PlaceHolder._setValue(input);
PlaceHolder._inputBind(input);
}
}
}
},
_newInputBind: function(input,newInput){
(newInput,'focus', function(){
y = 'none';
y = '';
();
});
(input,'focus', function(){
y = 'none';
y = '';
();
});
(input,'blur', function(){
if( === ''){
y = '';
y = 'none';
}
});
},
_inputBind: function(input){
(input,'focus',function(){
if( === (input,'placeholder')){
= '';
Class(input,ame);
();
}
});
(input,'blur',function(){
if( === '') PlaceHolder._setValue(input);
});
},
_setValue: function(input){
= (input,'placeholder');
ss(input,ame);
},
on: function(el,type,fn){
if(ntListener) ntListener(type, fn, false);
else Event('on' + type, function(){return (el,event)});
},
hasClass: function (o,c){
return -1 < (' '+ ame +' ').indexOf(' '+ c +' ');
},
addClass: function(o,c){
if(!ss(o,c)) ame += ' '+ c;
},
removeClass: function(o,c){
if(ss(o,c)){
var reg = new RegExp('(s|^)'+ c +'(s|$)');
ame = e(reg,'');
}
},
attr: function(o,v){
return o.v || ribute(v);
},
after: function(n,o){


发布评论