参考:http://lavasoft.blog.51cto.com/62575/481054/
http://blog.youkuaiyun.com/muziduoxi/article/details/11123923
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
<meta http-equiv="expires" content="0">
<title>SSL VPN</title>
<script type="text/javascript" language="javascript">
function doAction1()
{
alert( "doAction1" );
}
function doAction2()
{
alert( "doAction2" );
}
function mysubmit()
{
var iframe = document.getElementById( "if_test" );
if (iframe.attachEvent)
{
iframe.detachEvent("onload", doAction1);
iframe.attachEvent("onload", doAction1);
}
else
{
iframe.onload = doAction2;
}
document.getElementById('myform').submit();
}
</script>
</head>
<body id="mybody">
<form id="myform" method="POST" action="/cgi-bin/printenv.cgi" enctype="multipart/form-data" target="if_test">
<div>
姓名:<input type="text" id="txtUsername" name="txtUsername"/><br />
年龄:<input type="text" id="txtAge" name="txtAge"/><br />
备注:<input type="text" id="txtDescription" name="txtDescription" /><br />
候时:<input type="text" id="txtWaitTime" Text="2000" name="txtWaitTime"/><br />
<input type="file" name="cacert" id="cacert" >
<input type="button" id="btnSubmit" value="normal_Submit" onclick="javascript:mysubmit();"/>
</div>
</form>
<iframe id="if_test" name="if_test" height="0" width="0"></iframe>
</body>
</html>