Home > Web Front-end > JS Tutorial > JavaScript 'Unexpected method or property access called' in IE_javascript tips

JavaScript 'Unexpected method or property access called' in IE_javascript tips

WBOY
Release: 2016-05-16 18:58:30
Original
1341 people have browsed it

The same piece of code, called twice, once passed and once exception:
function clearSelect(obj){
if(obj && obj.options)
obj.options.length=0;
}
The following are some previous experiences:
These are two classic anomalies, which are difficult to locate if you don’t know the principles. The conditions that occur can be seen from the code below