var UI$Contract$ddlForm_change = function() {
//'this' is currently the drop down that fires the event
// My question is can I change the context so "this" represents another object?
this = SomeObject;
// then call methods on the new "this"
this.someMethod(someParam);
};
क्या यह संभव है? धन्यवाद, ~ सैन डिएगो में सीकेक्या मैं जावास्क्रिप्ट का संदर्भ बदल सकता हूं "यह"?
इस प्रश्न का उत्तर देखें: http://stackoverflow.com/questions/456967/javascript-how-to-set-this-variable-easily – molf
yepp, http: // stackoverflow का डुप्लिकेट अधिक या कम। कॉम/प्रश्न/456967/जावास्क्रिप्ट-कैसे-सेट-सेट-यह-वेरिएबल-आसानी से स्वीकृत उत्तर कॉल()/लागू() का उपयोग करना था, https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference देखें/Global_Objects/फ़ंक्शन/लागू – VolkerK
यह केवल भ्रमित करने वाला है। सभी उत्तर नहीं कहते हैं, आप इसे नहीं कर सकते हैं। जाहिर है, डुप्लिकेट प्रश्न के उत्तर हाँ के जवाब, आप इसे कर सकते हैं। जाओ पता लगाओ। – DOK