From the script, on the mobile browser, how can I reliably know if the onload event has been fired, but if I have no ability to register it. The problem is the J/S code can be executed before or after the onload the event has been 开发者_StackOverflow中文版fired, and the script has no way to latching on to it (if it latches on to onload, and it never comes because it already happened, the rest of the code won't execute)
I'm not 100% sure I understand your question, but what I'm thinking you're asking..
You can just do something like:
<script type="text/javascript" charset="utf-8">
function onLoad(){
console.log("loaded");
}
</script>
<body onload="onLoad()">
精彩评论