例如:
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
document.getElementById('ajax').innerHTML = xhr.responseText;
}
};
notice xhr.onreadystatechange is not camelCased but xhr.responseText is. Is there a reason for this that I've missed?
还有诸如:onmousedown/onmouseup 等等,都不是驼峰命名的