Home > Web Front-end > JS Tutorial > js onload event does not work example analysis_javascript skills

js onload event does not work example analysis_javascript skills

WBOY
Release: 2016-05-16 17:20:44
Original
1089 people have browsed it

I encountered a strange problem in the previous incident. I wrote an onload event in the jsp page and found that it didn't work. Looking at the source file, there was no method name after bady's onload? ? ?



I'm confused Solution,

So try

Copy the code The code is as follows:

< /body>
< script language="javascript">
window.onload = getState()
< /script>

It’s actually no problem... , why is this? ?

It turns out that

There is a damn window in this js. .onload = sorttable.init; This js is used in other pages, a table operation js down on the Internet.

At least give you a reminder, it is very likely that it has been used in other places, causing conflicts!
Related labels:
js
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template