``` <script>
window.onload=function(){
alert(1);
}
</script>
<script>
$(document).ready(function(){
alert(2);
})
// 可以简写成
$(function(){
})
</script>