Try This one :-
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
<script type="text/javascript">
</script>
</head>
<body>
<form id="frm">
<input type="text" id="txt" >
<input type="button" value=" Click " onclick="javascript:RegainFocus();"/>
</form>
</body>
</html>