How can I take a focus??(javascript)

E

eunicon

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>focus »¯±â</title>
<script type="text/javascript">
function defaultMsgPaste(target){
if(!target.value){
target.value = target.defaultValue;
}
}
function defaultMsgCut(target){
if(target.value==target.defaultValue){
target.value="";
}
}
function getFocus(){
frm.txtField.focus();
}
window.onload=function(){
this.frm.txtArea.focus();
}
</script>
</head>
<body>
<form action="#" name="frm">
<textarea rows="10" cols="20" name="txtArea"
onblur="defaultMsgPaste(this); this.focus();"
onfocus="defaultMsgCut(this)">TEXTAREA!!!</textarea><br>
<input type="text" name="txtField" value="TEXTFIELD!!!"
onblur="defaultMsgPaste(this)" onfocus="defaultMsgCut(this)"
onclick="">
</form>
</body>
</html>

as you see, I'd like to take a focus from the other form tags!!

I put "this.focus()" at onblur event in textarea tag.....

and I'd like to take the focus in txtField....but It is very
difficult...;;;

I know if I don't use "this.focus", all is done !!!!

I really want to know How take the focus !!!

please Help me~~!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top