I'm executing an external script, using a <script>
inside <head>
.(我正在使用<head>
内的<script>
执行外部脚本。)
Now since the script executes before the page has loaded, I can't access the <body>
, among other things.(现在,由于脚本是在页面加载之前执行的,因此我无法访问<body>
。) I'd like to execute some JavaScript after the document has been "loaded" (HTML fully downloaded and in-RAM).(在文档“加载”后(HTML已完全下载并在RAM中),我想执行一些JavaScript。) Are there any events that I can hook onto when my script executes, that will get triggered on page load?(执行脚本时,是否有任何我可以钩住的事件会在页面加载时触发?)
ask by Robinicks translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…