सभी को;jQuery में एक घटना को मजबूर करें
मैं दशमलव स्थानों के लिए एक ऊपर और नीचे बनाया है काउंटर और जब कोई परिवर्तन होता है मैं इसे निम्न कोड के साथ क्षेत्रों पुनर्गणना के लिए एक कलंक घटना के लिए मजबूर किया है:
$('button').click(function(){
var decPlaces = document.calculator.dpv.value * 1;
var hii = document.calculator.origin.value;
if (this.id == 'up' && decPlaces < 9){
document.calculator.dpv.value = decPlaces + 1;
if (hii != ''){
document.calculator[hii].focus();
document.calculator[hii].blur();
}
}
if (this.id == 'down' && decPlaces > 0){
document.calculator.dpv.value = decPlaces - 1;
if (hii != ''){
document.calculator[hii].focus();
document.calculator[hii].blur();
}
}
एफएफ में काम करता है अच्छी तरह से, लेकिन दूसरों में खींच लेता है विशेष रूप से आईई - क्लीनर और तेज़ बनाने पर सुझावों की सराहना की जाती है।
बॉब
क्या आप धुंध/फोकस ईवेंट भी दिखा सकते हैं। – redsquare