这在 IE 中不起作用(尽管它在 FFX 中起作用)。为什么?
在标题中使用 HTML:
<script type="application/javascript">
// And finally, let's call the code ourselves.
window.onload = lbp.init;
</script>
然后是脚本:
// lbp is the script's universal variable, which retains everything
var lbp = {};
// The sequence of functions to trigger
lbp.init = function() {
alert('hi');
}
提前感谢您的帮助 =)