javascript_tips

onload 函数如果没有特定需求,可以直接定义初始函数:

1
window.onload = (){...} //表示读取页面时直接进行操作

常用事件:onsubmit/onload/onfocus/onblur/onclick