Due to the fly operating principle, we cannot save the fly returned results in variables for reuse, because each fly operation may change the DOM orientation of the variable. See the followingCodeIs incorrect:
VaR my_id = ext. Fly ('My _ id ');
Ext. Fly ('another _ id'); // The DOM reference of my_id has changed to another_id.
My_id.highlight ('ff000000', {// The operation here will be an operation on the another_id Element
Endcolor: '0000ff', Duration: 3
});
Ext. get and ext. fly returns an element object, but Ext. get returns an independent element and has its own independent operation interface encapsulation. It can save the returned value to the variable for future call operations, which makes reuse easier. However, one of its major drawbacks is memory consumption. If Ext. Get (ID) is called 1000 times, 1000 independent elements will be created in the memory. However, in many cases, we may only execute a very simple operation on the DOM element, so if we create an independent element every time and put it in the memory, it is a huge waste of memory, therefore, when we only need to perform one operation or a very simple operation, we use Ext. get seems unreasonable. Ext. Fly is designed to solve this problem. It saves memory by enabling a set of Operation interfaces in the shared memory of each created element.