1、输出文本
document.write(sum);
2、触发事件
<input type="button" name="click" onclick="alert('click');" value="触发事件" />
3 、