判断用户的在线状态onbeforeunload事件_javascript技巧