<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<script language="javascript">
<!--
window.οnlοad=function(){
var ele=document.getElementById('sub');
alert('staart'+ele.name);
//ele.click();
ele.onclick();
document.activeElement=ele;
alert('edn'+ele.name);
}
function checkForm(form)
{
alert(document.activeElement.name)
}
//-->
</script>
<form action="" method="POST" name="iform" enctype="multipart/form-data" οnsubmit="return checkForm(this)">
<input type="submit" name="submit1" value="aaa1" >
<input type="submit" name="submit2" id="sub" value="aaa2" οnclick="javascript:alert(1111)" >
</form>
</html>
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<script language="javascript">
<!--
window.οnlοad=function(){
var ele=document.getElementById('sub');
alert('staart'+ele.name);
//ele.click();
ele.onclick();
document.activeElement=ele;
alert('edn'+ele.name);
}
function checkForm(form)
{
alert(document.activeElement.name)
}
//-->
</script>
<form action="" method="POST" name="iform" enctype="multipart/form-data" οnsubmit="return checkForm(this)">
<input type="submit" name="submit1" value="aaa1" >
<input type="submit" name="submit2" id="sub" value="aaa2" οnclick="javascript:alert(1111)" >
</form>
</html>