统治者
如果你厌倦了像这样声明 DOM 元素:
var formNode , submitButtonNode , nameInputNode , emailInputNode ;
window . onload = function ( ) {
formNode = document . getElementById ( 'form' ) ;
submitButtonNode = document . getElementById ( 'submit' ) ;
nameInputNode = document . getElementById ( 'name' ) ;
emailInputNode = document . getElementById ( 'email' ) ;
console . log ( formNode , submi
1