setTimeout--------------------------------------------------------------------------------DescriptionEvaluates an expression after a specified number of milliseconds has elapsed. Syntax timeoutID = object.setTimeout(expression, msec [, language])Parameter Description expression (String) Code to be executed at the specified interval. msec (Long) Numeric value or numeric string in millisecond units. language Optional. (String) String that specifies the language in which the code is executed. Return ValueReturns an identifier that is used only to cancel the evaluation with the clearTimeout method.
{
form1.action="ss.jsp";
form1.target="design";
form1.submit();
/*想在这里停留5秒*/
form1.action="zx.jsp";
form1.target="design";
form1.submit(); }
</script>
timeoutID = object.setTimeout(expression, msec [, language])Parameter Description
expression (String) Code to be executed at the specified interval.
msec (Long) Numeric value or numeric string in millisecond units.
language Optional. (String) String that specifies the language in which the code is executed. Return ValueReturns an identifier that is used only to cancel the evaluation with the clearTimeout method.
function dosubmit()
{
form1.action="http://www.csdn.net";
form1.target="design";
form1.submit();
setTimeout("submit2()",5000)
}
function submit2() {
form1.action="http://www.pchome.net";
form1.target="design";
form1.submit();
}
</SCRIPT>
<form onsubmit="dosubmit()" name="form1">
<INPUT TYPE="submit" VALUE="submit">
</form>为了演示效果,改了action