on the state onreadystatechange与onload有啥区别吗?

onreadystatechange与onload有啥区别吗?IE的script元素支持onreadystatechange事件,但不支持onload事件。FF的script元素不支持onreadys

onreadystatechange与onload有啥区别吗?

IE的script元素支持onreadystatechange事件,但不支持onload事件。FF的script元素不支持onreadystatechange事件,只支持onload事件。如果你想在一个此.readyState值“loaded”或“complete”表示脚本已加载。如何结合IE和FF的区别?请参阅jQuery源代码:varscript=文档.createElement(“脚本”)脚本.src="https://img.kmw.com xx.js公司" script.onload=脚本.onreadystatechange=function(){if(!this.readyState//这是FF的判断语句,因为FF没有readyState值,即readyState必须有值| |this.readyState==“已加载”| |this.readyState==“Complete”//这是IE的判断语句{alert(“loaded”)}

onconnectionstatechange中的newstate代表什么意思?

,正确答案是:connection state;connection state;连接状态。如果您不了解连接状态,请及时询问