$ (' #phoneNumber '). On (' Input ', function () {
var Valuep = $ (this). attr (' value ');
if (valuep.length = = 11) {
$ (' #getVerCode '). Removeclass (' Unclick ');
$ ('. Getvercodej '). CSS (' Display ', ' none ');
}
else{
$ (' #getVerCode '). addclass (' Unclick ');
$ ('. Getvercodej '). CSS (' Display ', ' block ');
}
});
For IE
if (document.all) {
$ (' #phoneNumber '). each (function () {
var that=this;
if (this.attachevent) {
This.attachevent (' Onpropertychange ', function (e) {
if (e.propertyname!= ' value ') return;
$ (that). Trigger (' input ');
var Valuep = $ (this). attr (' value ');
if (valuep.length = = 11) {
$ (' #getVerCode '). Removeclass (' Unclick ');
$ ('. Getvercodej '). CSS (' Display ', ' none ');
}
else{
$ (' #getVerCode '). addclass (' Unclick ');
$ ('. Getvercodej '). CSS (' Display ', ' block ');
}
});
}
})
}
JS Input Monitoring Compatibility event