とても簡単な作業ですが、どこかが間違っている.. 見つけられません。
function get(obj) { return document.getElementById(obj); }
var SomeObj = {
t1:null,t2:null,
hide: function() {
if(parseFloat(get("wr_st").style.opacity)>0.45) {
get("wr_st").style.opacity-=0.05;
} else {
clearInterval(SomeObj.t1);
}
},
show: function() {
if(parseFloat(get("wr_st").style.opacity)<1) {
get("wr_st").style.opacity+=0.05;
} else {
clearInterval(SomeObj.t2);
}
},
fade: function($wt) {
if($wt==1) {
clearInterval(menu.status.t2);
menu.status.t1=setInterval('SomeObj.hide();',10);
} else if($wt==2) {
clearInterval(menu.status.t1);
menu.status.t2=setInterval('SomeObj.show();',10);
}
}
}
だから、私は入力(タイプ=テキスト)を持っています。属性付き:
onfocus="SomeObj.fade(1);"
onblur="SomeObj.fade(2);".
オンブラーが機能しません。より正確には、これは機能しません:
get("wr_st").style.opacity+=0.05;
例としてここに配置すると: alert('NOOOO'); opacity+=0.5 が機能しないため、常に処理中です.. 助けてもらえますか: WTF はそれであり、なぜ機能しないのですか? ありがとうございました..