1.JavaScript字符串
2.JavaScript数组
var readyState = 'loaded' if (readyState == 'loaded' || readyState == 'complete') console.log('onload') var rreadyState = /complete|loaded/ if (rreadyState.test(readyState)) console.log('onload') if (~['complete', 'loaded'].indexOf(readyState)) console.log('onload')