上csdn 学了许多,写出来与大家分享,作为自己的总结,谢。
1。代替tab:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language="javascript">
<!--
// JScript source code 2002-11-1
//使用时必须在button的中加入onFocus="nextfield ='last';" 以便在//button获得焦点时按回车就可以提交。
nextfield = "box1";
function enter2tab(e)
{
if (nextfield == 'last') return true;
else if (window.event.keyCode==13) window.event.keyCode=9
}
document.onkeydown=enter2tab;
-->
</script>
</head>
<body>
<form name="yourform" ID="Form1">
<FONT face="宋体"></FONT><input type="text" name="dm"> <input type="text" name="d2">
<input type="submit" name="gbgbgb" onFocus="nextfield ='last';" onblur="nextfield ='box1';" value="警告" onclick="alert('dvvv')">
</form>
</body>
</html>