<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
<title>
free move tab
</title>
</head>
<body bgcolor="#ffffff">
<script language="JavaScript" type="text/JavaScript">
function Init(the)
{
the.elements[0].focus();
for (var n=0;n<the.elements.length;n++)
{
the.elements[n].tabIndex=n+1;
}
}
function focuscolor(obj)
{
obj.style.color="blue";
obj.style.backgroundColor="blue";
}
function pressblur(obj)
{obj.style.color="white";
obj.style.backgroundColor="white";
}
</script>
</head>
<body οnlοad="Init(form1)">
<form name="form1" method="post" action="" />
<input type="text" name="textfield2" οnfοcus='focuscolor(this)' οnblur='pressblur(this)'
/ >
<br>
<input type="text" name="textfield3" οnfοcus='focuscolor(this)' οnblur='pressblur(this)'
/>
<br>
<input type="text" name="textfield4" οnfοcus='focuscolor(this)' οnblur='pressblur(this)'/>
<br>
<input type="text" name="textfield3" οnfοcus='focuscolor(this)' οnblur='pressblur(this)'/>
<br>
<input type="text" name="textfield4" οnfοcus='focuscolor(this)' οnblur='pressblur(this)'/>
<br>
<input type="text" name="textfield5" οnfοcus='focuscolor(this)' οnblur='pressblur(this)'/>
<br>
<input type="text" name="textfield" οnfοcus='focuscolor(this)' οnblur='pressblur(this)' οnkeydοwn='if(window.event.keyCode==13) form1.elements[0].focus();'/>
</form>
</body>
</html>
tabindex(1)
最新推荐文章于 2018-11-07 14:39:40 发布