高级程序设计3第13章 事件处理程序 在函数的内部可以像访问局部变量一样访问 document 及元素本身的成员对应的这个函数一般会用try -catch 包一下,怕在解析前就触发了事件; function() { with(document) { width(this) { // 元素属性值 } } } <!-- 输出 "Click Me" --> <input type="button" value="Click Me" onclick="alert(value)">