求一个javascript事件
有没有等html页面都载入完成后才触发的事件,就是读完最后一个 </html>标记才触发的事件,有吗?帮助感谢
如下
Test.htm
-----------------
<html>
<body>
<div> </div>
</body>
</html>
window.onload=function(){
alert(1);
}
//or
document.body.onload=function(){
alert(2);
}
将要触发的事件代码块放在网页尾部即可实现.
如:
<script>
alert("a");
</script>
将要触发的事件代码块放在网页尾部即可实现.
如:
Test.htm
-----------------
<html>
<body>
<div> </div>
<script>
alert("a");
</script>
</body>
</html>
JScript code
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.
相关问答:
<form id="form1" runat="server">
<div>
<script type="text/javascript">
function oo(a){
document.getEleme ......
这是我的文本框
<input type="text" size="60" name="password_answer" id="pwdanswer" value="$!password_answer" >
提交按钮
<input clas ......
后台有一个函数 protected string Fun1(int a, string b)
我想在javascript代码中调用它,怎么做?
function GridBind()
{
var a = 1;
var b='s';
& ......
$("p:first").before(" <center> <button id=\"button1\" onClick=\"cut()\">剪切 </button> <button id=\"button2\">复制 <\/button> ......
我要在HTML中用JavaScript代码异步获取XML文件中一个节点的值比如
<?xml version="1.0" encoding="GB2312"?>
<configuration>
<appSettings>
......